From patchwork Wed Aug 19 13:02:43 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 42601 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7JD5LKs021571 for ; Wed, 19 Aug 2009 13:05:22 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752163AbZHSNDh (ORCPT ); Wed, 19 Aug 2009 09:03:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752036AbZHSNDh (ORCPT ); Wed, 19 Aug 2009 09:03:37 -0400 Received: from mx2.redhat.com ([66.187.237.31]:50589 "EHLO mx2.redhat.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752032AbZHSNCu (ORCPT ); Wed, 19 Aug 2009 09:02:50 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7JD2qLI006063; Wed, 19 Aug 2009 09:02:52 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n7JD2obP003321; Wed, 19 Aug 2009 09:02:50 -0400 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n7JD2l6g023111; Wed, 19 Aug 2009 09:02:49 -0400 Received: from localhost.localdomain (cleopatra.tlv.redhat.com [10.35.255.11]) by cleopatra.tlv.redhat.com (Postfix) with ESMTP id EC154250AEF; Wed, 19 Aug 2009 16:02:45 +0300 (IDT) From: Avi Kivity To: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 47/47] KVM: fix lock imbalance Date: Wed, 19 Aug 2009 16:02:43 +0300 Message-Id: <1250686963-8357-48-git-send-email-avi@redhat.com> In-Reply-To: <1250686963-8357-1-git-send-email-avi@redhat.com> References: <1250686963-8357-1-git-send-email-avi@redhat.com> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org From: Jiri Slaby There is a missing unlock on one fail path in ioapic_mmio_write, fix that. Signed-off-by: Jiri Slaby Signed-off-by: Avi Kivity --- virt/kvm/ioapic.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c index ddf6aa9..8a9c6cc 100644 --- a/virt/kvm/ioapic.c +++ b/virt/kvm/ioapic.c @@ -292,7 +292,7 @@ static int ioapic_mmio_write(struct kvm_io_device *this, gpa_t addr, int len, data = *(u32 *) val; else { printk(KERN_WARNING "ioapic: Unsupported size %d\n", len); - return 0; + goto unlock; } addr &= 0xff; @@ -313,6 +313,7 @@ static int ioapic_mmio_write(struct kvm_io_device *this, gpa_t addr, int len, default: break; } +unlock: mutex_unlock(&ioapic->kvm->irq_lock); return 0; }