mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
[LINUX] Kexec: Don't try to load an NULL image. This can occur when unloading.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
This commit is contained in:
1 parent
c9d971bec6
commit
b0a47bd080
1 file changed
+5
-3
@@ -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);
|
||||
|
||||