Skip to content

Commit

Permalink
[CRYPTO] blkcipher: Increase kmalloc amount to aligned block size
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
herbertx authored and David S. Miller committed Oct 10, 2007
1 parent d805848 commit 2614de1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/blkcipher.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2614de1

Please sign in to comment.