
From: Andrea Arcangeli <andrea@suse.de>

This patch avoids a lockup with kernel.panic sysctl > 0, due an underflow
of the number of the cpus.

Signed-off-by: Andrea Arcangeli <andrea@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/x86_64/kernel/smp.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletion(-)

diff -puN arch/x86_64/kernel/smp.c~x86_64-avoid-panic-lockup arch/x86_64/kernel/smp.c
--- 25/arch/x86_64/kernel/smp.c~x86_64-avoid-panic-lockup	Mon Mar  7 17:21:34 2005
+++ 25-akpm/arch/x86_64/kernel/smp.c	Mon Mar  7 17:21:34 2005
@@ -384,7 +384,10 @@ void smp_send_stop(void)
 	__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();
 }
 
 /*
_
