[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-3.3-testing] x86, hvm: fix a domain_lock leak



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1245159345 -3600
# Node ID ef7b1d4fec7d241fa1d92de130c8e71d70fa6978
# Parent  855d5ed53cbac36eaf0f1fe7a2a7e98dfba22ceb
x86, hvm: fix a domain_lock leak
Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
xen-unstable changeset:   19764:775afcdc2759
xen-unstable date:        Tue Jun 16 13:33:12 2009 +0100
---
 xen/arch/x86/hvm/hvm.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff -r 855d5ed53cba -r ef7b1d4fec7d xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Tue Jun 16 14:25:31 2009 +0100
+++ b/xen/arch/x86/hvm/hvm.c    Tue Jun 16 14:35:45 2009 +0100
@@ -504,11 +504,13 @@ static int hvm_load_cpu_ctxt(struct doma
     vc = &v->arch.guest_context;
 
     /* Need to init this vcpu before loading its contents */
+    rc = 0;
     domain_lock(d);
     if ( !v->is_initialised )
-        if ( (rc = boot_vcpu(d, vcpuid, vc)) != 0 )
-            return rc;
+        rc = boot_vcpu(d, vcpuid, vc);
     domain_unlock(d);
+    if ( rc != 0 )
+        return rc;
 
     if ( hvm_load_entry(CPU, h, &ctxt) != 0 ) 
         return -EINVAL;
@@ -2264,7 +2266,7 @@ static void hvm_s3_suspend(struct domain
     vpic_reset(d);
     vioapic_reset(d);
     pit_reset(d);
-    rtc_reset(d);      
+    rtc_reset(d);
     pmtimer_reset(d);
     hpet_reset(d);
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.