public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/0] Panic on softdog timeout
@ 2011-01-18 12:44 Anithra P Janakiraman
  2011-01-18 15:52 ` Américo Wang
  2011-01-18 16:35 ` Dave Hansen
  0 siblings, 2 replies; 5+ messages in thread
From: Anithra P Janakiraman @ 2011-01-18 12:44 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 305 bytes --]


Hi.

We currently have no way of determining the reason for failure when a 
softdog timeout occurs. At the minimum a snapshot of the system would 
help to determine the cause.
The attached patch invokes panic on softdog timeout iff kdump is 
configured, if kdump is not configured it works as usual.





[-- Attachment #2: softdogpanic --]
[-- Type: text/plain, Size: 1444 bytes --]

Signed-off-by: Anithra P J <anithra@linux.vnet.ibm.com>

---
 drivers/watchdog/softdog.c |   14 ++++++++++----
 kernel/kexec.c             |    1 +
 2 files changed, 11 insertions(+), 4 deletions(-)

Index: linux-2.6.37-rc4/drivers/watchdog/softdog.c
===================================================================
--- linux-2.6.37-rc4.orig/drivers/watchdog/softdog.c
+++ linux-2.6.37-rc4/drivers/watchdog/softdog.c
@@ -48,6 +48,7 @@
 #include <linux/init.h>
 #include <linux/jiffies.h>
 #include <linux/uaccess.h>
+#include <linux/kexec.h>

 #define PFX "SoftDog: "

@@ -99,10 +100,15 @@
 	if (soft_noboot)
 		printk(KERN_CRIT PFX "Triggered - Reboot ignored.\n");
 	else {
-		printk(KERN_CRIT PFX "Initiating system reboot.\n");
-		emergency_restart();
-		printk(KERN_CRIT PFX "Reboot didn't ?????\n");
-	}
+		if (kexec_crash_image) {
+			printk(KERN_CRIT PFX "Initiating kdump. \n");
+			panic("Watchdog timer expired.");
+		} else {
+			printk(KERN_CRIT PFX "Initiating system reboot. \n");
+			emergency_restart();
+			printk(KERN_CRIT PFX "Reboot didn't ?????\n");
+		}
+	      }
 }

 /*
Index: linux-2.6.37-rc4/kernel/kexec.c
===================================================================
--- linux-2.6.37-rc4.orig/kernel/kexec.c
+++ linux-2.6.37-rc4/kernel/kexec.c
@@ -935,6 +935,7 @@
  */
 struct kimage *kexec_image;
 struct kimage *kexec_crash_image;
+EXPORT_SYMBOL(kexec_crash_image);

 static DEFINE_MUTEX(kexec_mutex);



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-01-25 15:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-18 12:44 [PATCH 0/0] Panic on softdog timeout Anithra P Janakiraman
2011-01-18 15:52 ` Américo Wang
2011-01-20  9:09   ` Anithra P Janakiraman
2011-01-18 16:35 ` Dave Hansen
2011-01-25 15:10   ` Anithra P Janakiraman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox