Skip to content

Commit 2614de1

Browse files
herbertxDavid S. Miller
authored andcommitted
[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 <[email protected]>
1 parent d805848 commit 2614de1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crypto/blkcipher.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ static inline int blkcipher_next_slow(struct blkcipher_desc *desc,
158158
if (walk->buffer)
159159
goto ok;
160160

161-
n = bsize * 3 - (alignmask + 1) +
161+
n = aligned_bsize * 3 - (alignmask + 1) +
162162
(alignmask & ~(crypto_tfm_ctx_alignment() - 1));
163163
walk->buffer = kmalloc(n, GFP_ATOMIC);
164164
if (!walk->buffer)

0 commit comments

Comments
 (0)