[PATCH] staging: unisys: visornic: Replace GFP_ATOMIC with GFP_KERNEL

Greg Kroah-Hartman gregkh at linuxfoundation.org
Thu May 23 07:17:13 UTC 2019


On Wed, May 22, 2019 at 10:35:30PM +0530, Hariprasad Kelam wrote:
> As per below information
> 
> GFP_KERNEL  FLAG
> 
> This is a normal allocation and might block. This is the flag to use in
> process context code when it is safe to sleep.
> 
> GFP_ATOMIC FLAG
> 
> The allocation is high-priority and does not sleep. This is the flag to
> use in interrupt handlers, bottom halves and other situations where you
> cannot sleep
> 
> And we can take advantage of GFP_KERNEL , as when system is in low
> memory chances of getting success is high compared to GFP_ATOMIC.
> 
> As visornic_probe is in  process context we can use GPF_KERNEL.

Ah, nice catch!  Will go queue this up now, thanks.

greg k-h


More information about the devel mailing list