projects/linux·commit 85eae82a

printk: Fix scheduling-while-atomic problem in console_cpu_notify()

85eae82a · Paul E. McKenney <[email protected]> · 2012-10-15 21:35:59 -07:00

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 <[email protected]>
Reviewed-by: Srivatsa S. Bhat <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Commit
85eae82a0855d49852b87deac8653e4ebc8b291f
Parents
75fa29c7

Changes

1 files changed · +0 −1

FileStatusAddDelContent
kernel/printk.cmodified+0−1View file

kernel/printk.c

View file
diff --git a/kernel/printk.c b/kernel/printk.c
index 66a2ea3..2d607f4 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -1890,7 +1890,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();