Message ID | ZR9l446ndB4n1Xl4@gondor.apana.org.au |
---|---|
State | Accepted |
Commit | 152d0bcdf1efcb54a4fa20f694e9c7bbb6d06cbf |
Headers | show |
Series | dm crypt: Fix reqsize in crypt_iv_eboiv_gen | expand |
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index f2662c21a6df..5315fd261c23 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -753,7 +753,8 @@ static int crypt_iv_eboiv_gen(struct crypt_config *cc, u8 *iv, int err; u8 *buf; - reqsize = ALIGN(crypto_skcipher_reqsize(tfm), __alignof__(__le64)); + reqsize = sizeof(*req) + crypto_skcipher_reqsize(tfm); + reqsize = ALIGN(reqsize, __alignof__(__le64)); req = kmalloc(reqsize + cc->iv_size, GFP_NOIO); if (!req)