aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/crash.c
diff options
context:
space:
mode:
authorBernhard Walle <bwalle@suse.de>2007-01-28 07:47:02 -0500
committerTony Luck <tony.luck@intel.com>2007-02-05 17:06:44 -0500
commitc2c77fe8df3e0322a613ba1540910632ad14d96d (patch)
tree38a6da2e1995b3050e32947019b1166e380c1ec5 /arch/ia64/kernel/crash.c
parent87f76d3aafe5b5e0a1d6d857088a0263b35afa6b (diff)
[IA64] Fix NULL-pointer dereference in ia64_machine_kexec()
This patch fixes a NULL-pointer dereference in ia64_machine_kexec(). The variable ia64_kimage is set in machine_kexec_prepare() which is called from sys_kexec_load(). If kdump wasn't configured before, ia64_kimage is NULL. machine_kdump_on_init() passes ia64_kimage() to machine_kexec() which assumes a valid value. The patch also adds a few sanity checks for the image to simplify debugging of similar problems in future. Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/ia64/kernel/crash.c')
-rw-r--r--arch/ia64/kernel/crash.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/ia64/kernel/crash.c b/arch/ia64/kernel/crash.c
index 2018e624f5e2..9d92097ce96d 100644
--- a/arch/ia64/kernel/crash.c
+++ b/arch/ia64/kernel/crash.c
@@ -118,6 +118,11 @@ machine_crash_shutdown(struct pt_regs *pt)
118static void 118static void
119machine_kdump_on_init(void) 119machine_kdump_on_init(void)
120{ 120{
121 if (!ia64_kimage) {
122 printk(KERN_NOTICE "machine_kdump_on_init(): "
123 "kdump not configured\n");
124 return;
125 }
121 local_irq_disable(); 126 local_irq_disable();
122 kexec_disable_iosapic(); 127 kexec_disable_iosapic();
123 machine_kexec(ia64_kimage); 128 machine_kexec(ia64_kimage);