ia64/xen-unstable

changeset 13345:79b5090c791f

[LINUX] Kexec: Don't try to load an NULL image. This can occur when unloading.

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
author Ian Campbell <ian.campbell@xensource.com>
date Tue Jan 09 17:14:28 2007 +0000 (2007-01-09)
parents c98f3f3f7099
children 91b9c6eae6e8
files linux-2.6-xen-sparse/kernel/kexec.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/kernel/kexec.c	Tue Jan 09 16:59:52 2007 +0000
     1.2 +++ b/linux-2.6-xen-sparse/kernel/kexec.c	Tue Jan 09 17:14:28 2007 +0000
     1.3 @@ -1012,9 +1012,11 @@ asmlinkage long sys_kexec_load(unsigned 
     1.4  			goto out;
     1.5  	}
     1.6  #ifdef CONFIG_XEN
     1.7 -	result = xen_machine_kexec_load(image);
     1.8 -	if (result)
     1.9 -		goto out;
    1.10 +	if (image) {
    1.11 +		result = xen_machine_kexec_load(image);
    1.12 +		if (result)
    1.13 +			goto out;
    1.14 +	}
    1.15  #endif
    1.16  	/* Install the new kernel, and  Uninstall the old */
    1.17  	image = xchg(dest_image, image);