[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <00e710db-3fcd-1fb7-3d19-b5761e241adc@huawei.com>
Date: Tue, 19 Jul 2022 11:31:02 +0800
From: shaozhengchao <shaozhengchao@...wei.com>
To: Herbert Xu <herbert@...dor.apana.org.au>
CC: <linux-crypto@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<liulongfang@...wei.com>, <davem@...emloft.net>,
<xuzaibo@...wei.com>, <weiyongjun1@...wei.com>,
<yuehaibing@...wei.com>
Subject: Re: [PATCH] crypto: hisilicon/hpre - don't use GFP_KERNEL to alloc
mem during softirq
On 2022/7/19 10:16, Herbert Xu wrote:
> On Tue, Jul 19, 2022 at 10:10:42AM +0800, Zhengchao Shao wrote:
>>
>> @@ -252,7 +252,7 @@ static int hpre_prepare_dma_buf(struct hpre_asym_request *hpre_req,
>> if (unlikely(shift < 0))
>> return -EINVAL;
>>
>> - ptr = dma_alloc_coherent(dev, ctx->key_sz, tmp, GFP_KERNEL);
>> + ptr = dma_alloc_coherent(dev, ctx->key_sz, tmp, flags);
>
> How about just using GFP_ATOMIC unconditinoally?
>
> Cheers,
Hi Herbert:
Thank you for your reply. I think differentiate the application
scenarios of GFP flags, which can be more suitable to allocate memory.
Zhengchao Shao
Powered by blists - more mailing lists