From: Greg Kroah-Hartman Date: Wed, 31 May 2006 23:13:03 +0000 (-0700) Subject: add kexec patch X-Git-Tag: v2.6.16.20~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=878de07ffa23ca5dbf5a8180f224d6eac8b7c0d4;p=thirdparty%2Fkernel%2Fstable-queue.git add kexec patch --- diff --git a/queue-2.6.16/series b/queue-2.6.16/series index 008feb2d03b..e4b873823b7 100644 --- a/queue-2.6.16/series +++ b/queue-2.6.16/series @@ -6,3 +6,4 @@ input-psmouse-fix-new-device-detection-logic.patch ohci1394-sbp2-fix-scsi_add_device-failed-with-pl-3507-based-devices.patch the-latest-consensus-libata-resume-fix.patch ipw2200-Filter-unsupported-channels-out-in-ad-hoc-mode.patch +x86_64-add-crashdump-trigger-points.patch diff --git a/queue-2.6.16/x86_64-add-crashdump-trigger-points.patch b/queue-2.6.16/x86_64-add-crashdump-trigger-points.patch new file mode 100644 index 00000000000..552c44ddb5a --- /dev/null +++ b/queue-2.6.16/x86_64-add-crashdump-trigger-points.patch @@ -0,0 +1,53 @@ +From nobody Mon Sep 17 00:00:00 2001 +From: Vivek Goyal +Date: Tue, 18 Apr 2006 12:35:13 +0200 +Subject: [PATCH] x86_64: x86_64 add crashdump trigger points + +o Start booting into the capture kernel after an Oops if system is in a + unrecoverable state. System will boot into the capture kernel, if one is + pre-loaded by the user, and capture the kernel core dump. + +o One of the following conditions should be true to trigger the booting of + capture kernel. + - panic_on_oops is set. + - pid of current thread is 0 + - pid of current thread is 1 + - Oops happened inside interrupt context. + +Signed-off-by: Vivek Goyal +Signed-off-by: Andi Kleen +Signed-off-by: Linus Torvalds +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86_64/kernel/traps.c | 5 +++++ + 1 file changed, 5 insertions(+) + +--- linux-2.6.16.19.orig/arch/x86_64/kernel/traps.c ++++ linux-2.6.16.19/arch/x86_64/kernel/traps.c +@@ -30,6 +30,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -434,6 +435,8 @@ void __kprobes __die(const char * str, s + printk(KERN_ALERT "RIP "); + printk_address(regs->rip); + printk(" RSP <%016lx>\n", regs->rsp); ++ if (kexec_should_crash(current)) ++ crash_kexec(regs); + } + + void die(const char * str, struct pt_regs * regs, long err) +@@ -456,6 +459,8 @@ void __kprobes die_nmi(char *str, struct + */ + printk(str, safe_smp_processor_id()); + show_registers(regs); ++ if (kexec_should_crash(current)) ++ crash_kexec(regs); + if (panic_on_timeout || panic_on_oops) + panic("nmi watchdog"); + printk("console shuts up ...\n");