mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
crypto: pcrypt - Fix handling of MAY_BACKLOG requests
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>
This commit is contained in:
+5
-2
@@ -69,6 +69,9 @@ static void pcrypt_aead_done(void *data, 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);
|
||||
@@ -82,7 +85,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;
|
||||
@@ -133,7 +136,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