kvm tools: Fix lock imbalance in virtio_console_pci_io_out()

Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
This commit is contained in:
Asias He
2011-04-13 00:23:29 +08:00
committed by Will Deacon
parent f98e80211f
commit e147d83835
+2
View File
@@ -163,6 +163,8 @@ static bool virtio_console_pci_io_out(struct kvm *self, uint16_t port, void *dat
unsigned long offset = port - IOPORT_VIRTIO_CONSOLE;
bool ret = true;
mutex_lock(&console_device.mutex);
switch (offset) {
case VIRTIO_PCI_GUEST_FEATURES:
console_device.guest_features = ioport__read32(data);