public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Anithra P Janakiraman <anithra@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org
Subject: [PATCH 0/0] Panic on softdog timeout
Date: Tue, 18 Jan 2011 18:14:36 +0530	[thread overview]
Message-ID: <4D358B34.7040902@linux.vnet.ibm.com> (raw)

[-- 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);



             reply	other threads:[~2011-01-18 12:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-18 12:44 Anithra P Janakiraman [this message]
2011-01-18 15:52 ` [PATCH 0/0] Panic on softdog timeout 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D358B34.7040902@linux.vnet.ibm.com \
    --to=anithra@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox