[PATCH] fix i386 panic hangs

Kanoj Sarcar (kanoj@google.engr.sgi.com)
Thu, 23 Dec 1999 13:38:57 -0800 (PST)


Linus,

The panic() path ends up doing 2 consecutive smp_send_stop(), one in
panic() itself, the other in i386 machine_restart(). The second one
hangs if there are >1 cpus, presumably because the other cpus are
not in a state to respond/act on the new stop request.

This patch fixes the problem, by allowing only the first smp_send_stop()
to do any real work.

Please include in 2.3.35. Thanks.

Kanoj

--- arch/i386/kernel/smp.c Tue Dec 21 10:37:09 1999
+++ arch/i386/kernel/smp.c Thu Dec 23 13:30:54 1999
@@ -504,8 +504,17 @@

void smp_send_stop(void)
{
+ static int done = 0;
unsigned long flags;

+ /*
+ * Prevent multiple stops, as from the panic path, else after
+ * the first one, everything hangs.
+ */
+ if (done)
+ return;
+ else
+ done = 1;
__save_flags(flags);
__cli();
smp_call_function(stop_this_cpu, NULL, 1, 0);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/