lkml.org 
[lkml]   [2011]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 0/0] Panic on softdog timeout

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.




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

\
 
 \ /
  Last update: 2011-01-18 13:47    [W:0.125 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site