Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > fc11cd6e1c513a17304da94a5390f3cd > files > 3748

kernel-2.6.18-194.11.1.el5.src.rpm

--- linux-2.6.17/drivers/char/sysrq.c.orig	2006-08-16 06:39:44.000000000 -0400
+++ linux-2.6.17/drivers/char/sysrq.c	2006-08-16 06:43:32.000000000 -0400
@@ -94,11 +94,16 @@
 #define sysrq_unraw_op (*(struct sysrq_key_op *)0)
 #endif /* CONFIG_VT */
 
-#ifdef CONFIG_KEXEC
 static void sysrq_handle_crashdump(int key, struct pt_regs *pt_regs,
 				struct tty_struct *tty)
 {
+#ifdef CONFIG_KEXEC
 	crash_kexec(pt_regs);
+	/* can't get here if crash image is loaded */
+	printk("Kexec: Warning: crash image not loaded\n");
+#endif
+	if(panic_on_oops)
+		panic("SysRq-triggered panic!\n");
 }
 static struct sysrq_key_op sysrq_crashdump_op = {
 	.handler	= sysrq_handle_crashdump,
@@ -106,9 +111,6 @@
 	.action_msg	= "Trigger a crashdump",
 	.enable_mask	= SYSRQ_ENABLE_DUMP,
 };
-#else
-#define sysrq_crashdump_op (*(struct sysrq_key_op *)0)
-#endif
 
 static void sysrq_handle_reboot(int key, struct pt_regs *pt_regs,
 				struct tty_struct *tty)