From: Ian Campbell Date: Tue, 9 Jan 2007 17:14:28 +0000 (+0000) Subject: [LINUX] Kexec: Don't try to load an NULL image. This can occur when unloading. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~15422^2~7^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b0a47bd080d9c9d78cbc054d04db609d0d085d2d;p=xen.git [LINUX] Kexec: Don't try to load an NULL image. This can occur when unloading. Signed-off-by: Ian Campbell --- diff --git a/linux-2.6-xen-sparse/kernel/kexec.c b/linux-2.6-xen-sparse/kernel/kexec.c index 9a1dbb6ae3..bb19157362 100644 --- a/linux-2.6-xen-sparse/kernel/kexec.c +++ b/linux-2.6-xen-sparse/kernel/kexec.c @@ -1012,9 +1012,11 @@ asmlinkage long sys_kexec_load(unsigned long entry, unsigned long nr_segments, goto out; } #ifdef CONFIG_XEN - result = xen_machine_kexec_load(image); - if (result) - goto out; + if (image) { + result = xen_machine_kexec_load(image); + if (result) + goto out; + } #endif /* Install the new kernel, and Uninstall the old */ image = xchg(dest_image, image);