From: Paul E. McKenney Date: Tue, 16 Oct 2012 04:35:59 +0000 (-0700) Subject: printk: Fix scheduling-while-atomic problem in console_cpu_notify() X-Git-Tag: v3.4.81~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5e23efd0c1d6c67761f859c141ba67bac80b81e0;p=platform%2Fkernel%2Flinux-stable.git printk: Fix scheduling-while-atomic problem in console_cpu_notify() commit 85eae82a0855d49852b87deac8653e4ebc8b291f upstream. The console_cpu_notify() function runs with interrupts disabled in the CPU_DYING case. It therefore cannot block, for example, as will happen when it calls console_lock(). Therefore, remove the CPU_DYING leg of the switch statement to avoid this problem. Signed-off-by: Paul E. McKenney Reviewed-by: Srivatsa S. Bhat Signed-off-by: Linus Torvalds Cc: Guillaume Morin Signed-off-by: Greg Kroah-Hartman --- diff --git a/kernel/printk.c b/kernel/printk.c index e95c662..e131c46 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -1172,7 +1172,6 @@ static int __cpuinit console_cpu_notify(struct notifier_block *self, switch (action) { case CPU_ONLINE: case CPU_DEAD: - case CPU_DYING: case CPU_DOWN_FAILED: case CPU_UP_CANCELED: console_lock();