diff options
author | Tom Lendacky <thomas.lendacky@amd.com> | 2013-12-05 23:09:53 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-12-12 10:36:29 +0400 |
commit | 9096e7d4889516c0bccb9b89b0c72cc5c127989a (patch) | |
tree | 10846e27547f6f80d1d30baa774cdb838cdec094 /include/crypto | |
parent | a983e1d30993f57ea201063479e5ededf2de935b (diff) | |
download | linux-9096e7d4889516c0bccb9b89b0c72cc5c127989a.tar.xz |
crypto: scatterwalk - Use sg_chain_ptr on chain entries
commit 389a5390583a18e45bc4abd4439291abec5e7a63 upstream.
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>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/crypto')
-rw-r--r-- | include/crypto/scatterwalk.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/crypto/scatterwalk.h b/include/crypto/scatterwalk.h index 09ef1a0c5499..2cddd2b92c19 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, |