- struct aes_ctx *ctx = aes_ctx(crypto_tfm_ctx(desc->tfm));
- padlock_xcrypt_cbc(in, out, ctx->E, desc->info, &ctx->cword.encrypt,
- nbytes / AES_BLOCK_SIZE);
+ struct aes_ctx *ctx = aes_ctx(desc->tfm);
+ u8 *iv;
+
+ iv = padlock_xcrypt_cbc(in, out, ctx->E, desc->info,
+ &ctx->cword.encrypt, nbytes / AES_BLOCK_SIZE);
+ memcpy(desc->info, iv, AES_BLOCK_SIZE);
+