X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=crypto%2Fessiv.c;h=307eba74b901e595ddb1a86e348e965f68d87f51;hb=refs%2Fheads%2Fsandbox%2Flstelmach%2Fvirgl;hp=e33369df90344545b9bffd8bfda2697190441a5a;hpb=bb1a1146467ad812bb65440696df0782e2bc63c8;p=platform%2Fkernel%2Flinux-starfive.git diff --git a/crypto/essiv.c b/crypto/essiv.c index e33369d..307eba7 100644 --- a/crypto/essiv.c +++ b/crypto/essiv.c @@ -171,7 +171,12 @@ static void essiv_aead_done(struct crypto_async_request *areq, int err) struct aead_request *req = areq->data; struct essiv_aead_request_ctx *rctx = aead_request_ctx(req); + if (err == -EINPROGRESS) + goto out; + kfree(rctx->assoc); + +out: aead_request_complete(req, err); } @@ -247,7 +252,7 @@ static int essiv_aead_crypt(struct aead_request *req, bool enc) err = enc ? crypto_aead_encrypt(subreq) : crypto_aead_decrypt(subreq); - if (rctx->assoc && err != -EINPROGRESS) + if (rctx->assoc && err != -EINPROGRESS && err != -EBUSY) kfree(rctx->assoc); return err; }