Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 5a1436beec57 ("crypto: pcrypt - call the complete function on error")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

+5 -2
+5 -2
crypto/pcrypt.c
··· 69 69 struct pcrypt_request *preq = aead_request_ctx(req); 70 70 struct padata_priv *padata = pcrypt_request_padata(preq); 71 71 72 + if (err == -EINPROGRESS) 73 + return; 74 + 72 75 padata->info = err; 73 76 74 77 padata_do_serial(padata); ··· 85 82 86 83 ret = crypto_aead_encrypt(req); 87 84 88 - if (ret == -EINPROGRESS) 85 + if (ret == -EINPROGRESS || ret == -EBUSY) 89 86 return; 90 87 91 88 padata->info = ret; ··· 136 133 137 134 ret = crypto_aead_decrypt(req); 138 135 139 - if (ret == -EINPROGRESS) 136 + if (ret == -EINPROGRESS || ret == -EBUSY) 140 137 return; 141 138 142 139 padata->info = ret;