lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <04001068-2880-d0b8-cf3b-4738b8bb7f2d@techveda.org>
Date:   Sat, 16 Dec 2017 13:51:08 +0530
From:   shrikant <shrikant.maurya@...hveda.org>
To:     "Rafael J. Wysocki" <rafael@...nel.org>
Cc:     "Rafael J. Wysocki" <rjw@...ysocki.net>,
        Pavel Machek <pavel@....cz>, Len Brown <len.brown@...el.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Linux PM <linux-pm@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        sunil.m@...hveda.org, karthik@...hveda.org, raghu@...hveda.org
Subject: Re: [PATCH] drivers: base: power: Fix GFP_KERNEL in spinlock context



On Tuesday 12 December 2017 10:25 PM, Rafael J. Wysocki wrote:
> On Tue, Dec 12, 2017 at 2:45 PM,  <shrikant.maurya@...hveda.org> wrote:
>> From: Shrikant Maurya <shrikant.maurya@...hveda.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.

Yes.

Better approach is, to move the call to device_init_wakeup() before the spinlock.

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

No.

> 
> Thanks,
> Rafael
> 

Thank you Rafeal.
-- 
Shrikant
techveda.org

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ