lkml.org 
[lkml]   [2009]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] KVM: fix lock imbalance
Date
There is a missing unlock on one fail path in ioapic_mmio_write,
fix that.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
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);
}

--
1.6.3.2


\
 
 \ /
  Last update: 2009-06-29 18:07    [W:0.031 / U:3.264 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site