diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2009-06-29 12:05:10 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-09-10 01:33:06 -0400 |
commit | 27c4ba60171d9ce29d3645619837760d758ed288 (patch) | |
tree | b32696a5c783c90009200b80783cb667b6e15005 /virt | |
parent | 22fc02943a630417cb71734cd0b2e6f8dc4210b6 (diff) |
KVM: fix lock imbalance
There is a missing unlock on one fail path in ioapic_mmio_write,
fix that.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'virt')
-rw-r--r-- | 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 ddf6aa998b18..8a9c6cc382f8 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, | |||
292 | data = *(u32 *) val; | 292 | data = *(u32 *) val; |
293 | else { | 293 | else { |
294 | printk(KERN_WARNING "ioapic: Unsupported size %d\n", len); | 294 | printk(KERN_WARNING "ioapic: Unsupported size %d\n", len); |
295 | return 0; | 295 | goto unlock; |
296 | } | 296 | } |
297 | 297 | ||
298 | addr &= 0xff; | 298 | addr &= 0xff; |
@@ -313,6 +313,7 @@ static int ioapic_mmio_write(struct kvm_io_device *this, gpa_t addr, int len, | |||
313 | default: | 313 | default: |
314 | break; | 314 | break; |
315 | } | 315 | } |
316 | unlock: | ||
316 | mutex_unlock(&ioapic->kvm->irq_lock); | 317 | mutex_unlock(&ioapic->kvm->irq_lock); |
317 | return 0; | 318 | return 0; |
318 | } | 319 | } |