From b0a47bd080d9c9d78cbc054d04db609d0d085d2d Mon Sep 17 00:00:00 2001 From: Ian Campbell Date: Tue, 9 Jan 2007 17:14:28 +0000 Subject: [PATCH] [LINUX] Kexec: Don't try to load an NULL image. This can occur when unloading. Signed-off-by: Ian Campbell --- linux-2.6-xen-sparse/kernel/kexec.c | 8 +++++--- 1 file 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); -- 2.30.2