Hi Greg,

Could you consider this patch from Paul for the 3.4 branch?  It has been
in the mainline since 3.7-rc2.

It applies fine (with some fuzz) on top of 3.4.80.  I assume this should be in
3.2 as well.

commit 85eae82a0855d49852b87deac8653e4ebc8b291f
Author: Paul E. McKenney <[email protected]>
Date:   Mon Oct 15 21:35:59 2012 -0700

    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 <[email protected]>
    Reviewed-by: Srivatsa S. Bhat <[email protected]>
    Signed-off-by: Linus Torvalds <[email protected]>

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();

Thanks
-- 
Guillaume Morin <[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to