Thread (14 messages) flat view 14 messages, 5 authors, 2012-03-15

[PATCH 2/3] led-triggers: use atomic kzalloc during led trigger registering

From: Linus Walleij <hidden>
Date: 2012-03-12 19:37:46
Also in: lkml

2012/3/10 Bryan Wu [off-list ref]:
2012/3/8 Uwe Kleine-K?nig [off-list ref]:
quoted
On Thu, Mar 08, 2012 at 05:11:02PM +0800, Bryan Wu wrote:
quoted
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 ... :-)

Thanks,
Linus Walleij
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help