From: Steffen Klassert <steffen.klassert@secunet.com>
To: Lu Jialin <lujialin4@huawei.com>
Cc: Daniel Jordan <daniel.m.jordan@oracle.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S . Miller" <davem@davemloft.net>,
"Guo Zihua" <guozihua@huawei.com>, <linux-crypto@vger.kernel.org>
Subject: Re: [PATCH v3] crypto: Fix hungtask for PADATA_RESET
Date: Tue, 5 Sep 2023 11:45:06 +0200 [thread overview]
Message-ID: <ZPb4ovJ+eatyPk1E@gauss3.secunet.de> (raw)
In-Reply-To: <20230904133341.2528440-1-lujialin4@huawei.com>
On Mon, Sep 04, 2023 at 01:33:41PM +0000, Lu Jialin wrote:
> ---
> crypto/pcrypt.c | 4 ++++
> kernel/padata.c | 2 +-
> 2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/crypto/pcrypt.c b/crypto/pcrypt.c
> index 8c1d0ca41213..d0d954fe9d54 100644
> --- a/crypto/pcrypt.c
> +++ b/crypto/pcrypt.c
> @@ -117,6 +117,8 @@ static int pcrypt_aead_encrypt(struct aead_request *req)
> err = padata_do_parallel(ictx->psenc, padata, &ctx->cb_cpu);
> if (!err)
> return -EINPROGRESS;
> + if (err == -EBUSY)
> + return -EAGAIN;
>
> return err;
> }
> @@ -164,6 +166,8 @@ static int pcrypt_aead_decrypt(struct aead_request *req)
> err = padata_do_parallel(ictx->psdec, padata, &ctx->cb_cpu);
> if (!err)
> return -EINPROGRESS;
> + if (err == -EBUSY)
> + return -EAGAIN;
>
> return err;
> }
> diff --git a/kernel/padata.c b/kernel/padata.c
> index 222d60195de6..81c8183f3176 100644
> --- a/kernel/padata.c
> +++ b/kernel/padata.c
> @@ -202,7 +202,7 @@ int padata_do_parallel(struct padata_shell *ps,
> *cb_cpu = cpu;
> }
>
> - err = -EBUSY;
> + err = -EBUSY;
Why not just returning -EAGAIN here directly?
next prev parent reply other threads:[~2023-09-05 16:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-04 13:33 [PATCH v3] crypto: Fix hungtask for PADATA_RESET Lu Jialin
2023-09-05 9:45 ` Steffen Klassert [this message]
2023-09-06 7:49 ` Lu Jialin
2023-09-06 7:56 ` Herbert Xu
2023-09-15 10:43 ` Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZPb4ovJ+eatyPk1E@gauss3.secunet.de \
--to=steffen.klassert@secunet.com \
--cc=daniel.m.jordan@oracle.com \
--cc=davem@davemloft.net \
--cc=guozihua@huawei.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=lujialin4@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox