[<prev] [next>] [day] [month] [year] [list]
Message-Id: <200808140614.m7E6EcPp006263@wolfmountaingroup.com>
Date: Thu, 14 Aug 2008 00:14:38 -0600
From: jmerkey@...fmountaingroup.com
To: linux-kernel@...r.kernel.org
Subject: [PATCH 2.6.27-rc3 25/29] mdb: add a notify_die handler to panic.c
add a notify_die handler to hook the panic entry point prior to
Linux "execve"-ing another kernel for crash analysis.
Signed-off-by: Jeffrey Vernon Merkey (jmerkey@...fmountaingroup.com)
--- a/kernel/panic.c 2008-08-13 14:22:32.000000000 -0600
+++ b/kernel/panic.c 2008-08-13 11:56:03.000000000 -0600
@@ -21,6 +21,8 @@
#include <linux/debug_locks.h>
#include <linux/random.h>
#include <linux/kallsyms.h>
+#include <linux/kdebug.h>
+
int panic_on_oops;
int tainted;
@@ -82,6 +84,13 @@
printk(KERN_EMERG "Kernel panic - not syncing: %s\n",buf);
bust_spinlocks(0);
+ /* call the notify_die handler for any resident debuggers which
+ * may be active and pass the message string. On a software
+ * fault return at least some sort of regs for a remote debugger
+ * to look at.
+ */
+ notify_die(DIE_PANIC, buf, get_irq_regs(), 0, 0, 0);
+
/*
* If we have crashed and we have a crash kernel loaded let it handle
* everything else.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists