提交 389a5390 编写于 作者: T Tom Lendacky 提交者: Herbert Xu

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: NTom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 8ec25c51
...@@ -44,7 +44,7 @@ static inline struct scatterlist *scatterwalk_sg_next(struct scatterlist *sg) ...@@ -44,7 +44,7 @@ static inline struct scatterlist *scatterwalk_sg_next(struct scatterlist *sg)
if (sg_is_last(sg)) if (sg_is_last(sg))
return NULL; 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, static inline void scatterwalk_crypto_chain(struct scatterlist *head,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册