crypto: algif_skcipher - EBUSY on aio should be an error
authorHerbert Xu <herbert@gondor.apana.org.au>
Fri, 31 Jul 2020 07:03:27 +0000 (17:03 +1000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 21 Aug 2020 04:45:26 +0000 (14:45 +1000)
I removed the MAY_BACKLOG flag on the aio path a while ago but
the error check still incorrectly interpreted EBUSY as success.
This may cause the submitter to wait for a request that will never
complete.

Fixes: dad419970637 ("crypto: algif_skcipher - Do not set...")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/algif_skcipher.c

index 478f3b8..ee8890e 100644 (file)
@@ -123,7 +123,7 @@ static int _skcipher_recvmsg(struct socket *sock, struct msghdr *msg,
                        crypto_skcipher_decrypt(&areq->cra_u.skcipher_req);
 
                /* AIO operation in progress */
-               if (err == -EINPROGRESS || err == -EBUSY)
+               if (err == -EINPROGRESS)
                        return -EIOCBQUEUED;
 
                sock_put(sk);