From: Kouya Shimura Subject: [PATCH] x86,hvm: fix a potential domain_lock leak Date: Fri, 12 Jun 2009 15:35:16 +0900 Message-ID: <7kski6dknv.fsf@pingu.sky.yk.fujitsu.co.jp> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="bOgOuh3UH3" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --bOgOuh3UH3 Content-Type: text/plain; charset=us-ascii Content-Description: message body text Content-Transfer-Encoding: 7bit Signed-off-by: Kouya Shimura --bOgOuh3UH3 Content-Type: text/x-patch Content-Disposition: inline; filename="hvm.patch" Content-Transfer-Encoding: 7bit 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; --bOgOuh3UH3 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --bOgOuh3UH3--