ChangeSet 1.2249, 2005/03/31 08:33:22-08:00, [EMAIL PROTECTED]

        [PATCH] x86_64: avoid panic lockup
        
        This patch avoids a lockup with kernel.panic sysctl > 0, due an 
underflow
        of the number of the cpus.
        
        Later, Andrea said:
        
         While this still seems a needed fix, unfortunately this wasn't enough 
to
         fix the problem (the first positive report I got was because they did a
         mistake and they tested an UP kernel, oh well ;).
        
         Anyway the smp_stop_cpu executed by the cpu that invoked panic is wrong
         and it really causes an underflow of the number of cpus that can lead 
to
         further lockups. So I don't want to stop you from merging it since it
         seems a correct fix and it brings x86-64 in line with the x86 code too.
        
         But apparently we need something more than this too.
        
        
        Signed-off-by: Andrea Arcangeli <[EMAIL PROTECTED]>
        Cc: Andi Kleen <[EMAIL PROTECTED]>
        Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
        Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>



 smp.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)


diff -Nru a/arch/x86_64/kernel/smp.c b/arch/x86_64/kernel/smp.c
--- a/arch/x86_64/kernel/smp.c  2005-03-31 10:14:54 -08:00
+++ b/arch/x86_64/kernel/smp.c  2005-03-31 10:14:54 -08:00
@@ -373,7 +373,10 @@
        __smp_call_function(smp_really_stop_cpu, NULL, 0, 0);
        if (!nolock)
                spin_unlock(&call_lock);
-       smp_stop_cpu();
+
+       local_irq_disable();
+       disable_local_APIC();
+       local_irq_enable();
 }
 
 /*
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to