diff options
-rw-r--r-- | crypto/authenc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/crypto/authenc.c b/crypto/authenc.c index ffce19de05cf..528b00bc4769 100644 --- a/crypto/authenc.c +++ b/crypto/authenc.c | |||
@@ -368,9 +368,10 @@ static void crypto_authenc_encrypt_done(struct crypto_async_request *req, | |||
368 | if (!err) { | 368 | if (!err) { |
369 | struct crypto_aead *authenc = crypto_aead_reqtfm(areq); | 369 | struct crypto_aead *authenc = crypto_aead_reqtfm(areq); |
370 | struct crypto_authenc_ctx *ctx = crypto_aead_ctx(authenc); | 370 | struct crypto_authenc_ctx *ctx = crypto_aead_ctx(authenc); |
371 | struct ablkcipher_request *abreq = aead_request_ctx(areq); | 371 | struct authenc_request_ctx *areq_ctx = aead_request_ctx(areq); |
372 | u8 *iv = (u8 *)(abreq + 1) + | 372 | struct ablkcipher_request *abreq = (void *)(areq_ctx->tail |
373 | crypto_ablkcipher_reqsize(ctx->enc); | 373 | + ctx->reqoff); |
374 | u8 *iv = (u8 *)abreq - crypto_ablkcipher_ivsize(ctx->enc); | ||
374 | 375 | ||
375 | err = crypto_authenc_genicv(areq, iv, 0); | 376 | err = crypto_authenc_genicv(areq, iv, 0); |
376 | } | 377 | } |