mirror of
https://github.com/clearlinux/kvmtool.git
synced 2026-08-29 03:05:45 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user