diff options
author | Tom Lendacky <thomas.lendacky@amd.com> | 2013-12-05 14:09:53 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2013-12-09 06:58:52 -0500 |
commit | 389a5390583a18e45bc4abd4439291abec5e7a63 (patch) | |
tree | b9230960727c5ff62e50cccf64e91bd5558ca8e4 | |
parent | 8ec25c51291681bd68bdc290b35f2e61fa601c21 (diff) |
crypto: scatterwalk - Use sg_chain_ptr on chain entries
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.
Cc: stable@vger.kernel.org
Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-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 64ebede184f1..6a626a507b8c 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) | |||
44 | if (sg_is_last(sg)) | 44 | if (sg_is_last(sg)) |
45 | return NULL; | 45 | return NULL; |
46 | 46 | ||
47 | return (++sg)->length ? sg : (void *)sg_page(sg); | 47 | return (++sg)->length ? sg : sg_chain_ptr(sg); |
48 | } | 48 | } |
49 | 49 | ||
50 | static inline void scatterwalk_crypto_chain(struct scatterlist *head, | 50 | static inline void scatterwalk_crypto_chain(struct scatterlist *head, |