kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Wei Yongjun <weiyongjun1@huawei.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Thara Gopinath <thara.gopinath@linaro.org>,
	linux-crypto@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Hulk Robot <hulkci@huawei.com>
Subject: Re: [PATCH -next] crypto: qce - Fix some error handling path
Date: Fri, 28 May 2021 13:50:55 +0800	[thread overview]
Message-ID: <20210528055055.GA14152@gondor.apana.org.au> (raw)
In-Reply-To: <20210519141650.3059054-1-weiyongjun1@huawei.com>

On Wed, May 19, 2021 at 02:16:50PM +0000, Wei Yongjun wrote:
>
> @@ -448,13 +450,17 @@ qce_aead_async_req_handle(struct crypto_async_request *async_req)
>  	if (ret)
>  		return ret;

Shouldn't this return do the error_free too?

>  	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, rctx->src_sg, rctx->src_nents, dir_src);
> -		if (src_nents < 0)
> +		if (src_nents < 0) {
> +			ret = src_nents;
>  			goto error_unmap_dst;
> +		}
>  	} else {
>  		if (IS_CCM(rctx->flags) && IS_DECRYPT(rctx->flags))
>  			src_nents = dst_nents;

If so please send a follow-up patch.

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

  reply	other threads:[~2021-05-28  5:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19 14:16 [PATCH -next] crypto: qce - Fix some error handling path Wei Yongjun
2021-05-28  5:50 ` Herbert Xu [this message]
2021-05-28  7:25 ` 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=20210528055055.GA14152@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=davem@davemloft.net \
    --cc=hulkci@huawei.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=thara.gopinath@linaro.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).