[PATCH 3.2 186/200] printk: Fix scheduling-while-atomic problem in console_cpu_notify()
From: Ben Hutchings
Date: Sun Mar 30 2014 - 19:47:25 EST
3.2.56-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: "Paul E. McKenney" <paulmck@xxxxxxxxxxxxxxxxxx>
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 <paulmck@xxxxxxxxxxxxxxxxxx>
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
---
kernel/printk.c | 1 -
1 file changed, 1 deletion(-)
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -1165,7 +1165,6 @@ static int __cpuinit console_cpu_notify(
switch (action) {
case CPU_ONLINE:
case CPU_DEAD:
- case CPU_DYING:
case CPU_DOWN_FAILED:
case CPU_UP_CANCELED:
console_lock();
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/