mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-07 04:09:21 +00:00
[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: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
d8058480b3
commit
2614de1b9a
1 changed files with 1 additions and 1 deletions
|
@ -158,7 +158,7 @@ static inline int blkcipher_next_slow(struct blkcipher_desc *desc,
|
||||||
if (walk->buffer)
|
if (walk->buffer)
|
||||||
goto ok;
|
goto ok;
|
||||||
|
|
||||||
n = bsize * 3 - (alignmask + 1) +
|
n = aligned_bsize * 3 - (alignmask + 1) +
|
||||||
(alignmask & ~(crypto_tfm_ctx_alignment() - 1));
|
(alignmask & ~(crypto_tfm_ctx_alignment() - 1));
|
||||||
walk->buffer = kmalloc(n, GFP_ATOMIC);
|
walk->buffer = kmalloc(n, GFP_ATOMIC);
|
||||||
if (!walk->buffer)
|
if (!walk->buffer)
|
||||||
|
|
Loading…
Reference in a new issue