WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH] x86,hvm: fix a potential domain_lock leak

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [PATCH] x86,hvm: fix a potential domain_lock leak
From: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Date: Fri, 12 Jun 2009 15:35:16 +0900
Delivery-date: Thu, 11 Jun 2009 23:38:52 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>

diff -r 4448fae52553 xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Mon Jun 08 12:24:14 2009 +0100
+++ b/xen/arch/x86/hvm/hvm.c    Fri Jun 12 15:30:49 2009 +0900
@@ -512,11 +512,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;
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] x86,hvm: fix a potential domain_lock leak, Kouya Shimura <=