lkml.org 
[lkml]   [2017]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] drivers: base: power: Fix GFP_KERNEL in spinlock context
On Tue, Dec 12, 2017 at 2:45 PM,  <shrikant.maurya@techveda.org> wrote:
> From: Shrikant Maurya <shrikant.maurya@techveda.org>
>
> As reported by Jia-Ju Bai (https://lkml.org/lkml/2017/12/11/872):
> API's are using GFP_KERNEL to allocate memory which may sleep.
>
> To ensure atomicity such allocations must be avoided in critical
> sections under spinlock.

That's right.

Which is why wakeup_source_create() should never be called under a spinlock.

Are you aware of any place that happens in the mainline kernel?

Thanks,
Rafael

\
 
 \ /
  Last update: 2017-12-12 17:55    [W:0.079 / U:0.588 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site