]> Pileus Git - ~andy/linux/blobdiff - crypto/blkcipher.c
[CRYPTO] blkcipher: Increase kmalloc amount to aligned block size
[~andy/linux] / crypto / blkcipher.c
index a3c87da23f1e1f7ad84fcf30e560a6d936267bdb..3d05586a8f34f34a9ff3e96312ccb6797ada3c22 100644 (file)
@@ -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)