ia64/xen-unstable

changeset 7911:94d39d9acc8e

Only resume xenbus /after/ we've prepared our VCPUs; otherwise the
VCPU hotplug callback can race with our vcpu_prepare.

Signed-off-by: Steven Hand <steven@xensource.com>
author smh22@firebug.cl.cam.ac.uk
date Fri Nov 18 19:56:03 2005 +0100 (2005-11-18)
parents 56d05708736a
children 04a7decd0645
files linux-2.6-xen-sparse/arch/xen/kernel/reboot.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c	Fri Nov 18 19:25:17 2005 +0100
     1.2 +++ b/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c	Fri Nov 18 19:56:03 2005 +0100
     1.3 @@ -182,12 +182,20 @@ static int __do_suspend(void *ignore)
     1.4  
     1.5  	xencons_resume();
     1.6  
     1.7 -	xenbus_resume();
     1.8 -
     1.9  #ifdef CONFIG_SMP
    1.10  	for_each_cpu(i)
    1.11  		vcpu_prepare(i);
    1.12  
    1.13 +#endif
    1.14 +
    1.15 +	/* 
    1.16 +	** Only resume xenbus /after/ we've prepared our VCPUs; otherwise
    1.17 +	** the VCPU hotplug callback can race with our vcpu_prepare
    1.18 +	*/
    1.19 +	xenbus_resume();
    1.20 +
    1.21 +
    1.22 +#ifdef CONFIG_SMP
    1.23   out_reenable_cpus:
    1.24  	for_each_cpu_mask(i, prev_online_cpus) {
    1.25  		j = cpu_up(i);