Skip to content

Commit 5e23efd

Browse files
paulmckgregkh
authored andcommitted
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 <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> Cc: Guillaume Morin <guillaume@morinfr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 36f0c45 commit 5e23efd

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

kernel/printk.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,6 @@ static int __cpuinit console_cpu_notify(struct notifier_block *self,
11721172
switch (action) {
11731173
case CPU_ONLINE:
11741174
case CPU_DEAD:
1175-
case CPU_DYING:
11761175
case CPU_DOWN_FAILED:
11771176
case CPU_UP_CANCELED:
11781177
console_lock();

0 commit comments

Comments
 (0)