Re: [PATCH] crypto: hisilicon/hpre - don't use GFP_KERNEL to alloc mem during softirq

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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,
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux