lkml.org 
[lkml]   [2015]   [Feb]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] staging: emxx_udc: Replace GFP_KERNEL with GFP_ATOMIC
On Fri, Feb 20, 2015 at 06:43:53PM +0530, Tapasweni Pathak wrote:
> To avoid deadlock, do not call blocking functions with spinlocks held.
>
> Replace GFP_KERNEL with GFP_ATOMIC, as the latter will fail if the pile
> doesn't have enough free pages but will not sleep and hence deadlock can
> be avoided.
>
> Found by Coccinelle.
>
> Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
> ---
> Is there any other way this can be fixed as it is better to avoid GFP_ATOMIC?

No, this is fine, nice fix.

thanks,

greg k-h


\
 
 \ /
  Last update: 2015-02-25 00:41    [W:0.026 / U:1.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site