From: Andi Kleen <ak@muc.de>

In some cases panic can be called with interrupts off.  Don't trigger the
NMI watchdog in this case when a panic= parameter is specified.



 kernel/panic.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletion(-)

diff -puN kernel/panic.c~panic-nmi-watchdog-fix kernel/panic.c
--- 25/kernel/panic.c~panic-nmi-watchdog-fix	2003-08-03 12:26:57.000000000 -0700
+++ 25-akpm/kernel/panic.c	2003-08-03 12:26:57.000000000 -0700
@@ -16,6 +16,7 @@
 #include <linux/init.h>
 #include <linux/sysrq.h>
 #include <linux/interrupt.h>
+#include <linux/nmi.h>
 
 asmlinkage void sys_sync(void);	/* it's really int */
 
@@ -71,12 +72,16 @@ NORET_TYPE void panic(const char * fmt, 
 
 	if (panic_timeout > 0)
 	{
+		int i;
 		/*
 	 	 * Delay timeout seconds before rebooting the machine. 
 		 * We can't use the "normal" timers since we just panicked..
 	 	 */
 		printk(KERN_EMERG "Rebooting in %d seconds..",panic_timeout);
-		mdelay(panic_timeout*1000);
+		for (i = 0; i < panic_timeout; i++) {
+			touch_nmi_watchdog();
+			mdelay(1000);
+		}
 		/*
 		 *	Should we run the reboot notifier. For the moment Im
 		 *	choosing not too. It might crash, be corrupt or do

_