aboutsummaryrefslogtreecommitdiffstats
path: root/linux-2.6-xen-sparse
diff options
context:
space:
mode:
authorIan Campbell <ian.campbell@xensource.com>2007-01-09 17:14:28 +0000
committerIan Campbell <ian.campbell@xensource.com>2007-01-09 17:14:28 +0000
commitb0a47bd080d9c9d78cbc054d04db609d0d085d2d (patch)
tree86cd50602be614c4633c3db5f2a2d91c9daec2d9 /linux-2.6-xen-sparse
parentc9d971bec6fb2584ee469dbbfc30a6dc76d65204 (diff)
downloadxen-b0a47bd080d9c9d78cbc054d04db609d0d085d2d.tar.gz
xen-b0a47bd080d9c9d78cbc054d04db609d0d085d2d.tar.bz2
xen-b0a47bd080d9c9d78cbc054d04db609d0d085d2d.zip
[LINUX] Kexec: Don't try to load an NULL image. This can occur when unloading.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Diffstat (limited to 'linux-2.6-xen-sparse')
-rw-r--r--linux-2.6-xen-sparse/kernel/kexec.c8
1 files changed, 5 insertions, 3 deletions
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);