lkml.org 
[lkml]   [2012]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/3] led-triggers: use atomic kzalloc during led trigger registering
On Tue, Mar 13, 2012 at 3:37 AM, Linus Walleij <linus.walleij@linaro.org> wrote:
> 2012/3/10 Bryan Wu <bryan.wu@canonical.com>:
>> 2012/3/8 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>:
>>> On Thu, Mar 08, 2012 at 05:11:02PM +0800, Bryan Wu wrote:
>>>> kzalloc might cause sleep and will generate some warning detected by lockdep,
>>>> when call led_trigger_register_simple on each cpu cores in SMP. This patch fix
>>>> this.
>>> The obvious (and IMHO better) alternative is to call
>>> led_trigger_register_simple from non-atomic context.
>>>
>>> For registering this should be OK, shouldn't it?
>>>
>> Thanks Uwe, it's my bad. I think I should not use on_each_cpu() API to
>> run led_trigger_register_simple. on_each_cpu() will disable interrupt.
>
> It might have been my mistake even so not your fault ... :-)
>

No problem, man. I just simply replaced GFP_KERNEL with GFP_ATOMIC
without thinking deeper.

Best Regards,
--
Bryan Wu <bryan.wu@canonical.com>
Kernel Developer    +86.138-1617-6545 Mobile
Canonical Ltd.      www.canonical.com
Ubuntu - Linux for human beings | www.ubuntu.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2012-03-13 09:53    [W:0.065 / U:1.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site