diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2012-10-16 00:35:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-10-16 21:17:44 -0400 |
commit | 85eae82a0855d49852b87deac8653e4ebc8b291f (patch) | |
tree | c7b6a9334bf9f56c361537c8273a12f4b0549e0b /kernel | |
parent | 75fa29c7000924060677e0591368045576daad93 (diff) |
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.
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>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/printk.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/kernel/printk.c b/kernel/printk.c index 66a2ea37b576..2d607f4d1797 100644 --- a/kernel/printk.c +++ b/kernel/printk.c | |||
@@ -1890,7 +1890,6 @@ static int __cpuinit console_cpu_notify(struct notifier_block *self, | |||
1890 | switch (action) { | 1890 | switch (action) { |
1891 | case CPU_ONLINE: | 1891 | case CPU_ONLINE: |
1892 | case CPU_DEAD: | 1892 | case CPU_DEAD: |
1893 | case CPU_DYING: | ||
1894 | case CPU_DOWN_FAILED: | 1893 | case CPU_DOWN_FAILED: |
1895 | case CPU_UP_CANCELED: | 1894 | case CPU_UP_CANCELED: |
1896 | console_lock(); | 1895 | console_lock(); |