From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [patch] add some unlocks on error paths irq_comm.c Date: Thu, 12 Nov 2009 21:35:25 -0200 Message-ID: <20091112233525.GA31925@amt.cnet> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, avi@redhat.com To: Dan Carpenter Return-path: Received: from mx1.redhat.com ([209.132.183.28]:9766 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755287AbZKLXgL (ORCPT ); Thu, 12 Nov 2009 18:36:11 -0500 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: Dan, This has already been fixed by commit 57225096e5888d84e84224bac13aae2aaed89280. Thanks. On Tue, Nov 10, 2009 at 10:57:09AM +0200, Dan Carpenter wrote: > There were a couple unlocks missing. They were found by smatch static > checker. Compile tested. > > regards, > dan carpenter > > Signed-off-by: Dan Carpenter > > --- orig/virt/kvm/irq_comm.c 2009-11-08 19:00:50.000000000 +0200 > +++ devel/virt/kvm/irq_comm.c 2009-11-08 19:04:45.000000000 +0200 > @@ -209,6 +209,7 @@ > sizeof(kvm->arch.irq_sources_bitmap)); > > if (irq_source_id >= sizeof(kvm->arch.irq_sources_bitmap)) { > + mutex_unlock(&kvm->irq_lock); > printk(KERN_WARNING "kvm: exhaust allocatable IRQ sources!\n"); > return -EFAULT; > } > @@ -229,6 +230,7 @@ > mutex_lock(&kvm->irq_lock); > if (irq_source_id < 0 || > irq_source_id >= sizeof(kvm->arch.irq_sources_bitmap)) { > + mutex_unlock(&kvm->irq_lock); > printk(KERN_ERR "kvm: IRQ source ID out of range!\n"); > return; > }