ia64/xen-unstable

changeset 19764:775afcdc2759

x86, hvm: fix a domain_lock leak
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Jun 16 13:33:12 2009 +0100 (2009-06-16)
parents 45ca3f3c3f98
children f2a3b7188906
files xen/arch/x86/hvm/hvm.c
line diff
     1.1 --- a/xen/arch/x86/hvm/hvm.c	Tue Jun 16 11:53:47 2009 +0100
     1.2 +++ b/xen/arch/x86/hvm/hvm.c	Tue Jun 16 13:33:12 2009 +0100
     1.3 @@ -512,11 +512,13 @@ static int hvm_load_cpu_ctxt(struct doma
     1.4      vc = &v->arch.guest_context;
     1.5  
     1.6      /* Need to init this vcpu before loading its contents */
     1.7 +    rc = 0;
     1.8      domain_lock(d);
     1.9      if ( !v->is_initialised )
    1.10 -        if ( (rc = boot_vcpu(d, vcpuid, vc)) != 0 )
    1.11 -            return rc;
    1.12 +        rc = boot_vcpu(d, vcpuid, vc);
    1.13      domain_unlock(d);
    1.14 +    if ( rc != 0 )
    1.15 +        return rc;
    1.16  
    1.17      if ( hvm_load_entry(CPU, h, &ctxt) != 0 ) 
    1.18          return -EINVAL;
    1.19 @@ -2296,7 +2298,7 @@ static void hvm_s3_suspend(struct domain
    1.20      vpic_reset(d);
    1.21      vioapic_reset(d);
    1.22      pit_reset(d);
    1.23 -    rtc_reset(d);	
    1.24 +    rtc_reset(d);
    1.25      pmtimer_reset(d);
    1.26      hpet_reset(d);
    1.27