linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hui Tang <tanghui20@huawei.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: <davem@davemloft.net>, <linux-crypto@vger.kernel.org>,
	<xuzaibo@huawei.com>, <wangzhou1@hisilicon.com>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] crypto: hisilicon/hpre - fix unmapping invalid dma address
Date: Mon, 19 Apr 2021 19:50:17 +0800	[thread overview]
Message-ID: <df8a9c03-de99-4d2f-e577-05924002136e@huawei.com> (raw)
In-Reply-To: <20210416112638.GA14703@gondor.apana.org.au>



On 2021/4/16 19:26, Herbert Xu wrote:
> On Sat, Apr 10, 2021 at 05:49:17PM +0800, Hui Tang wrote:
>> Currently, an invalid dma address may be unmapped when calling
>> 'xx_data_clr_all' in error path, so check dma address of sqe in/out
>> whether it has been mapped before calling 'dma_free_coherent' or
>> 'dma_unmap_single'.
>>
>> An abnormal case is as follows:
>> hpre_curve25519_compute_value
>> 	-> hpre_curve25519_src_init
>> 	-> hpre_curve25519_hw_data_clr_all
>>
>> Fixes: a9214b0b6ed2(crypto: hisilicon - fix the check on dma address)
>> Signed-off-by: Hui Tang <tanghui20@huawei.com>
>> ---
>>  drivers/crypto/hisilicon/hpre/hpre_crypto.c | 18 ++++++++++++++++++
>>  1 file changed, 18 insertions(+)
>
> This triggers new sparse warnings.

Thanks, I will fix it in 5.13 rc1.

      reply	other threads:[~2021-04-19 11:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-10  9:49 [PATCH] crypto: hisilicon/hpre - fix unmapping invalid dma address Hui Tang
2021-04-16 11:26 ` Herbert Xu
2021-04-19 11:50   ` Hui Tang [this message]

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=df8a9c03-de99-4d2f-e577-05924002136e@huawei.com \
    --to=tanghui20@huawei.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wangzhou1@hisilicon.com \
    --cc=xuzaibo@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).