ia64/linux-2.6.18-xen.hg

changeset 465:1cf7ba68d855

xen suspend: Fix write-after-read error on fast_suspend flag.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Mar 03 13:36:57 2008 +0000 (2008-03-03)
parents 8c6d994a3f79
children 26e1e96bd46a
files drivers/xen/core/machine_reboot.c
line diff
     1.1 --- a/drivers/xen/core/machine_reboot.c	Mon Mar 03 11:02:08 2008 +0000
     1.2 +++ b/drivers/xen/core/machine_reboot.c	Mon Mar 03 13:36:57 2008 +0000
     1.3 @@ -205,7 +205,7 @@ static int take_machine_down(void *_susp
     1.4  int __xen_suspend(int fast_suspend, void (*resume_notifier)(void))
     1.5  {
     1.6  	int err, suspend_cancelled;
     1.7 -	struct suspend suspend = { fast_suspend, resume_notifier };
     1.8 +	struct suspend suspend;
     1.9  
    1.10  	BUG_ON(smp_processor_id() != 0);
    1.11  	BUG_ON(in_interrupt());
    1.12 @@ -222,6 +222,9 @@ int __xen_suspend(int fast_suspend, void
    1.13  	if (num_possible_cpus() == 1)
    1.14  		fast_suspend = 0;
    1.15  
    1.16 +	suspend.fast_suspend = fast_suspend;
    1.17 +	suspend.resume_notifier = resume_notifier;
    1.18 +
    1.19  	if (fast_suspend) {
    1.20  		xenbus_suspend();
    1.21  		err = stop_machine_run(take_machine_down, &suspend, 0);