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:
Herbert Xu
2026-04-16 17:00:50 +08:00
committed by Ulrich Hecht
parent f52d593d64
commit 97280fe904

View File

@ -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;