Fix scheduling-while-atomic problem in console_cpu_notify()
PATCH 1/1 Fix scheduling-while-atomic problem in console_cpu_notify()
The console_cpu_notify( function runs with interrupts disabled in the CPU_DEAD case. It therefore cannot block, for example, as will happen when it calls console_lock(). Therefore, remove the CPU_DEAD leg of the switch statement to avoid this problem.
kernel/printk.c +0 -1
@@ -1889,7 +1889,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 :
Quoted 6 lines · Paul E. McKenney
The console_cpu_notify( function runs with interrupts disabled in the
CPU_DEADcase. It therefore cannot block, for example, as will happen when it callsconsole_lock(). Therefore, remove theCPU_DEADleg of the switch statement to avoid this problem.Signed-off-by Paul E. McKenney <[email protected]>
s/CPU_DEAD/CPU_DYING/
Apparently it is a bad idea to compose and send a patch while in a C++ standards committee meeting where people are arguing about async futures... Fixed patch below.
Thanx, Paul
------------------------------------------------------------------------
printk: Fix scheduling-while-atomic problem in console_cpu_notify()
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.
kernel/printk.c +0 -1
@@ -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 ();
Srivatsa S. Bhat
Reviewed-byQuoted 18 lines · Paul E. McKenney
Quoted 6 lines · Paul E. McKenney
The console_cpu_notify( function runs with interrupts disabled in the
CPU_DEADcase. It therefore cannot block, for example, as will happen when it callsconsole_lock(). Therefore, remove theCPU_DEADleg of the switch statement to avoid this problem.Signed-off-by Paul E. McKenney <[email protected]>s/CPU_DEAD/CPU_DYING/
Apparently it is a bad idea to compose and send a patch while in a C++ standards committee meeting where people are arguing about async futures... Fixed patch below.
Thanx, Paul
------------------------------------------------------------------------
Quoted 9 lines
printk: Fix scheduling-while-atomic problem in
console_cpu_notify()The console_cpu_notify( function runs with interrupts disabled in the
CPU_DYINGcase. It therefore cannot block, for example, as will happen when it callsconsole_lock(). Therefore, remove theCPU_DYINGleg of the switch statement to avoid this problem.Signed-off-by Paul E. McKenney <[email protected]>
Regards,
Srivatsa S. Bhat
Quoted 13 lines
kernel/printk.c +0
-1@@ -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 ();