Message ID | 6edc4ab00aab67632659d12451e4437399550159.1558445259.git.christophe.leroy@c-s.fr (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Herbert Xu |
Headers | show |
Series | Fixing selftests failure on Talitos driver | expand |
diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index 1d429fc073d1..f443cbe7da80 100644 --- a/drivers/crypto/talitos.c +++ b/drivers/crypto/talitos.c @@ -1637,11 +1637,15 @@ static void ablkcipher_done(struct device *dev, int err) { struct ablkcipher_request *areq = context; + struct crypto_ablkcipher *cipher = crypto_ablkcipher_reqtfm(areq); + struct talitos_ctx *ctx = crypto_ablkcipher_ctx(cipher); + unsigned int ivsize = crypto_ablkcipher_ivsize(cipher); struct talitos_edesc *edesc; edesc = container_of(desc, struct talitos_edesc, desc); common_nonsnoop_unmap(dev, edesc, areq); + memcpy(areq->info, ctx->iv, ivsize); kfree(edesc);