This is a note to let you know that I've just added the patch titled crypto: algif_aead - Do not set MAY_BACKLOG on the async path to the 5.9-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: crypto-algif_aead-do-not-set-may_backlog-on-the-async-path.patch and it can be found in the queue-5.9 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From cbdad1f246dd98e6c9c32a6e5212337f542aa7e0 Mon Sep 17 00:00:00 2001 From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Date: Fri, 31 Jul 2020 17:03:50 +1000 Subject: crypto: algif_aead - Do not set MAY_BACKLOG on the async path From: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> commit cbdad1f246dd98e6c9c32a6e5212337f542aa7e0 upstream. The async path cannot use MAY_BACKLOG because it is not meant to block, which is what MAY_BACKLOG does. On the other hand, both the sync and async paths can make use of MAY_SLEEP. Fixes: 83094e5e9e49 ("crypto: af_alg - add async support to...") Cc: <stable@xxxxxxxxxxxxxxx> Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- crypto/algif_aead.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- a/crypto/algif_aead.c +++ b/crypto/algif_aead.c @@ -78,7 +78,7 @@ static int crypto_aead_copy_sgl(struct c SYNC_SKCIPHER_REQUEST_ON_STACK(skreq, null_tfm); skcipher_request_set_sync_tfm(skreq, null_tfm); - skcipher_request_set_callback(skreq, CRYPTO_TFM_REQ_MAY_BACKLOG, + skcipher_request_set_callback(skreq, CRYPTO_TFM_REQ_MAY_SLEEP, NULL, NULL); skcipher_request_set_crypt(skreq, src, dst, len, NULL); @@ -291,19 +291,20 @@ static int _aead_recvmsg(struct socket * areq->outlen = outlen; aead_request_set_callback(&areq->cra_u.aead_req, - CRYPTO_TFM_REQ_MAY_BACKLOG, + CRYPTO_TFM_REQ_MAY_SLEEP, af_alg_async_cb, areq); err = ctx->enc ? crypto_aead_encrypt(&areq->cra_u.aead_req) : crypto_aead_decrypt(&areq->cra_u.aead_req); /* AIO operation in progress */ - if (err == -EINPROGRESS || err == -EBUSY) + if (err == -EINPROGRESS) return -EIOCBQUEUED; sock_put(sk); } else { /* Synchronous operation */ aead_request_set_callback(&areq->cra_u.aead_req, + CRYPTO_TFM_REQ_MAY_SLEEP | CRYPTO_TFM_REQ_MAY_BACKLOG, crypto_req_done, &ctx->wait); err = crypto_wait_req(ctx->enc ? Patches currently in stable-queue which might be from herbert@xxxxxxxxxxxxxxxxxxx are queue-5.9/crypto-caam-qi-add-support-for-more-xts-key-lengths.patch queue-5.9/crypto-caam-jr-add-support-for-more-xts-key-lengths.patch queue-5.9/crypto-caam-jr-add-fallback-for-xts-with-more-than-8b-iv.patch queue-5.9/crypto-caam-qi2-add-support-for-more-xts-key-lengths.patch queue-5.9/crypto-caam-add-xts-check-for-block-length-equal-to-zero.patch queue-5.9/crypto-caam-qi2-add-fallback-for-xts-with-more-than-8b-iv.patch queue-5.9/crypto-algif_aead-do-not-set-may_backlog-on-the-async-path.patch queue-5.9/crypto-caam-qi-add-fallback-for-xts-with-more-than-8b-iv.patch