From patchwork Mon Jun 29 16:05:10 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 32985 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 n5TG6k9g031523 for ; Mon, 29 Jun 2009 16:06:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758313AbZF2QFh (ORCPT ); Mon, 29 Jun 2009 12:05:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755332AbZF2QFh (ORCPT ); Mon, 29 Jun 2009 12:05:37 -0400 Received: from smtp.wellnetcz.com ([212.24.148.102]:52420 "EHLO smtp.wellnetcz.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752782AbZF2QFg (ORCPT ); Mon, 29 Jun 2009 12:05:36 -0400 Received: from localhost.localdomain ([88.208.94.142]) by smtp.wellnetcz.com (8.14.1/8.14.1) with ESMTP id n5TGmioA029940; Mon, 29 Jun 2009 18:48:44 +0200 From: Jiri Slaby To: avi@redhat.com Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Jiri Slaby Subject: [PATCH] KVM: fix lock imbalance Date: Mon, 29 Jun 2009 18:05:10 +0200 Message-Id: <1246291510-3676-1-git-send-email-jirislaby@gmail.com> X-Mailer: git-send-email 1.6.3.2 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org There is a missing unlock on one fail path in ioapic_mmio_write, fix that. Signed-off-by: Jiri Slaby --- 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 d8b2eca..2b3307b 100644 --- a/virt/kvm/ioapic.c +++ b/virt/kvm/ioapic.c @@ -290,7 +290,7 @@ static void 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; + goto unlock; } addr &= 0xff; @@ -311,6 +311,7 @@ static void ioapic_mmio_write(struct kvm_io_device *this, gpa_t addr, int len, default: break; } +unlock: mutex_unlock(&ioapic->kvm->irq_lock); }