提交 2614de1b 编写于 作者: H Herbert Xu 提交者: David S. Miller

[CRYPTO] blkcipher: Increase kmalloc amount to aligned block size

Now that the block size is no longer a multiple of the alignment, we need to
increase the kmalloc amount in blkcipher_next_slow to use the aligned block
size.
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 d8058480
......@@ -158,7 +158,7 @@ static inline int blkcipher_next_slow(struct blkcipher_desc *desc,
if (walk->buffer)
goto ok;
n = bsize * 3 - (alignmask + 1) +
n = aligned_bsize * 3 - (alignmask + 1) +
(alignmask & ~(crypto_tfm_ctx_alignment() - 1));
walk->buffer = kmalloc(n, GFP_ATOMIC);
if (!walk->buffer)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册