mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
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>
This commit is contained in:
parent
22fc02943a
commit
27c4ba6017
1 changed files with 2 additions and 1 deletions
|
@ -292,7 +292,7 @@ static int ioapic_mmio_write(struct kvm_io_device *this, gpa_t addr, int len,
|
||||||
data = *(u32 *) val;
|
data = *(u32 *) val;
|
||||||
else {
|
else {
|
||||||
printk(KERN_WARNING "ioapic: Unsupported size %d\n", len);
|
printk(KERN_WARNING "ioapic: Unsupported size %d\n", len);
|
||||||
return 0;
|
goto unlock;
|
||||||
}
|
}
|
||||||
|
|
||||||
addr &= 0xff;
|
addr &= 0xff;
|
||||||
|
@ -313,6 +313,7 @@ static int ioapic_mmio_write(struct kvm_io_device *this, gpa_t addr, int len,
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
unlock:
|
||||||
mutex_unlock(&ioapic->kvm->irq_lock);
|
mutex_unlock(&ioapic->kvm->irq_lock);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue