mirror of
https://github.com/LineageOS/android_kernel_fxtec_sm6115.git
synced 2026-08-18 12:41:04 +00:00
crypto: pcrypt - Fix handling of MAY_BACKLOG requests
commit 915b692e6cb723aac658c25eb82c58fd81235110 upstream.
MAY_BACKLOG requests can return EBUSY. Handle them by checking
for that value and filtering out EINPROGRESS notifications.
Reported-by: Yiming Qian <yimingqian591@gmail.com>
Fixes: 5a1436beec ("crypto: pcrypt - call the complete function on error")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ulrich Hecht <uli@kernel.org>
This commit is contained in:
@ -129,6 +129,9 @@ static void pcrypt_aead_done(struct crypto_async_request *areq, int err)
|
||||
struct pcrypt_request *preq = aead_request_ctx(req);
|
||||
struct padata_priv *padata = pcrypt_request_padata(preq);
|
||||
|
||||
if (err == -EINPROGRESS)
|
||||
return;
|
||||
|
||||
padata->info = err;
|
||||
|
||||
padata_do_serial(padata);
|
||||
@ -142,7 +145,7 @@ static void pcrypt_aead_enc(struct padata_priv *padata)
|
||||
|
||||
ret = crypto_aead_encrypt(req);
|
||||
|
||||
if (ret == -EINPROGRESS)
|
||||
if (ret == -EINPROGRESS || ret == -EBUSY)
|
||||
return;
|
||||
|
||||
padata->info = ret;
|
||||
@ -190,7 +193,7 @@ static void pcrypt_aead_dec(struct padata_priv *padata)
|
||||
|
||||
ret = crypto_aead_decrypt(req);
|
||||
|
||||
if (ret == -EINPROGRESS)
|
||||
if (ret == -EINPROGRESS || ret == -EBUSY)
|
||||
return;
|
||||
|
||||
padata->info = ret;
|
||||
|
||||
Reference in New Issue
Block a user