Skip to content

Commit 915b692

Browse files
committed
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 <[email protected]> Fixes: 5a1436b ("crypto: pcrypt - call the complete function on error") Signed-off-by: Herbert Xu <[email protected]>
1 parent 8451ab6 commit 915b692

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

crypto/pcrypt.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ static void pcrypt_aead_done(void *data, int err)
6969
struct pcrypt_request *preq = aead_request_ctx(req);
7070
struct padata_priv *padata = pcrypt_request_padata(preq);
7171

72+
if (err == -EINPROGRESS)
73+
return;
74+
7275
padata->info = err;
7376

7477
padata_do_serial(padata);
@@ -82,7 +85,7 @@ static void pcrypt_aead_enc(struct padata_priv *padata)
8285

8386
ret = crypto_aead_encrypt(req);
8487

85-
if (ret == -EINPROGRESS)
88+
if (ret == -EINPROGRESS || ret == -EBUSY)
8689
return;
8790

8891
padata->info = ret;
@@ -133,7 +136,7 @@ static void pcrypt_aead_dec(struct padata_priv *padata)
133136

134137
ret = crypto_aead_decrypt(req);
135138

136-
if (ret == -EINPROGRESS)
139+
if (ret == -EINPROGRESS || ret == -EBUSY)
137140
return;
138141

139142
padata->info = ret;

0 commit comments

Comments
 (0)