[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>
This commit is contained in:

committed by
Tony Luck

parent
87f76d3aaf
commit
c2c77fe8df
@@ -118,6 +118,11 @@ machine_crash_shutdown(struct pt_regs *pt)
|
||||
static void
|
||||
machine_kdump_on_init(void)
|
||||
{
|
||||
if (!ia64_kimage) {
|
||||
printk(KERN_NOTICE "machine_kdump_on_init(): "
|
||||
"kdump not configured\n");
|
||||
return;
|
||||
}
|
||||
local_irq_disable();
|
||||
kexec_disable_iosapic();
|
||||
machine_kexec(ia64_kimage);
|
||||
|
Reference in New Issue
Block a user