From: Thara Gopinath <thara.gopinath@linaro.org>
To: Wei Yongjun <weiyongjun1@huawei.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>
Cc: linux-crypto@vger.kernel.org, linux-arm-msm@vger.kernel.org,
kernel-janitors@vger.kernel.org, Hulk Robot <hulkci@huawei.com>
Subject: Re: [PATCH -next] crypto: qce: skcipher: fix error return code in qce_skcipher_async_req_handle()
Date: Tue, 8 Jun 2021 18:42:16 -0400 [thread overview]
Message-ID: <09514ef3-183f-db3d-7525-aefcb1275383@linaro.org> (raw)
In-Reply-To: <20210602113645.3038800-1-weiyongjun1@huawei.com>
On 6/2/21 7:36 AM, Wei Yongjun wrote:
> Fix to return a negative error code from the error handling
> case instead of 0, as done elsewhere in this function.
>
> Fixes: 1339a7c3ba05 ("crypto: qce: skcipher: Fix incorrect sg count for dma transfers")
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Thara Gopinath <thara.gopinath@linaro.org>
--
Warm Regards
Thara
> ---
> drivers/crypto/qce/skcipher.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/crypto/qce/skcipher.c b/drivers/crypto/qce/skcipher.c
> index 259418479227..8ff10928f581 100644
> --- a/drivers/crypto/qce/skcipher.c
> +++ b/drivers/crypto/qce/skcipher.c
> @@ -124,13 +124,17 @@ qce_skcipher_async_req_handle(struct crypto_async_request *async_req)
> rctx->dst_sg = rctx->dst_tbl.sgl;
>
> dst_nents = dma_map_sg(qce->dev, rctx->dst_sg, rctx->dst_nents, dir_dst);
> - if (dst_nents < 0)
> + if (dst_nents < 0) {
> + ret = dst_nents;
> goto error_free;
> + }
>
> if (diff_dst) {
> src_nents = dma_map_sg(qce->dev, req->src, rctx->src_nents, dir_src);
> - if (src_nents < 0)
> + if (src_nents < 0) {
> + ret = src_nents;
> goto error_unmap_dst;
> + }
> rctx->src_sg = req->src;
> } else {
> rctx->src_sg = rctx->dst_sg;
>
next prev parent reply other threads:[~2021-06-08 22:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-02 11:36 [PATCH -next] crypto: qce: skcipher: fix error return code in qce_skcipher_async_req_handle() Wei Yongjun
2021-06-08 22:42 ` Thara Gopinath [this message]
2021-06-11 7:23 ` 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=09514ef3-183f-db3d-7525-aefcb1275383@linaro.org \
--to=thara.gopinath@linaro.org \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=hulkci@huawei.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=weiyongjun1@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;
as well as URLs for NNTP newsgroup(s).