Skip to content

Commit

Permalink
printk: Fix scheduling-while-atomic problem in console_cpu_notify()
Browse files Browse the repository at this point in the history
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@linux.vnet.ibm.com>
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Paul E. McKenney authored and Linus Torvalds committed Oct 17, 2012
1 parent 75fa29c commit 85eae82
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion kernel/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 85eae82

Please sign in to comment.