|
@@ -30,6 +30,7 @@
|
|
|
#include <linux/moduleparam.h>
|
|
|
#include <linux/nmi.h>
|
|
|
#include <linux/kprobes.h>
|
|
|
+#include <linux/kexec.h>
|
|
|
|
|
|
#include <asm/system.h>
|
|
|
#include <asm/uaccess.h>
|
|
@@ -433,6 +434,8 @@ void __kprobes __die(const char * str, struct pt_regs * regs, long err)
|
|
|
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)
|
|
@@ -455,6 +458,8 @@ void __kprobes die_nmi(char *str, struct pt_regs *regs)
|
|
|
*/
|
|
|
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");
|