* [PATCH] crypto: scatterwalk - Use sg_chain_ptr on chain entries
@ 2013-12-05 19:09 Tom Lendacky
2013-12-09 11:57 ` Herbert Xu
0 siblings, 1 reply; 2+ messages in thread
From: Tom Lendacky @ 2013-12-05 19:09 UTC (permalink / raw)
To: davem, linux-crypto, herbert; +Cc: linux-kernel
Now that scatterwalk_sg_chain sets the chain pointer bit the sg_page
call in scatterwalk_sg_next hits a BUG_ON when CONFIG_DEBUG_SG is
enabled. Use sg_chain_ptr instead of sg_page on a chain entry.
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
---
include/crypto/scatterwalk.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/crypto/scatterwalk.h b/include/crypto/scatterwalk.h
index 64ebede..6a626a5 100644
--- a/include/crypto/scatterwalk.h
+++ b/include/crypto/scatterwalk.h
@@ -44,7 +44,7 @@ static inline struct scatterlist *scatterwalk_sg_next(struct scatterlist *sg)
if (sg_is_last(sg))
return NULL;
- return (++sg)->length ? sg : (void *)sg_page(sg);
+ return (++sg)->length ? sg : sg_chain_ptr(sg);
}
static inline void scatterwalk_crypto_chain(struct scatterlist *head,
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] crypto: scatterwalk - Use sg_chain_ptr on chain entries
2013-12-05 19:09 [PATCH] crypto: scatterwalk - Use sg_chain_ptr on chain entries Tom Lendacky
@ 2013-12-09 11:57 ` Herbert Xu
0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2013-12-09 11:57 UTC (permalink / raw)
To: Tom Lendacky; +Cc: davem, linux-crypto, linux-kernel
On Thu, Dec 05, 2013 at 01:09:53PM -0600, Tom Lendacky wrote:
> Now that scatterwalk_sg_chain sets the chain pointer bit the sg_page
> call in scatterwalk_sg_next hits a BUG_ON when CONFIG_DEBUG_SG is
> enabled. Use sg_chain_ptr instead of sg_page on a chain entry.
>
> Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Patch applied. Thanks!
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-09 11:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-05 19:09 [PATCH] crypto: scatterwalk - Use sg_chain_ptr on chain entries Tom Lendacky
2013-12-09 11:57 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®