]> git.proxmox.com Git - mirror_qemu.git/commitdiff
qxl: locking fix
authorGerd Hoffmann <kraxel@redhat.com>
Fri, 21 Jan 2011 09:32:03 +0000 (10:32 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 24 Jan 2011 14:15:15 +0000 (15:15 +0100)
One spice worker call lacks the unlock/relock calls,
which may lead to deadlocks, add them.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hw/qxl.c

index dcea65d982fd222f5ad60235e2dcd0132a990802..fe4212bff04e73afa3d46de513d14eea44089b29 100644 (file)
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -866,7 +866,9 @@ static void qxl_destroy_primary(PCIQXLDevice *d)
     dprint(d, 1, "%s\n", __FUNCTION__);
 
     d->mode = QXL_MODE_UNDEFINED;
+    qemu_mutex_unlock_iothread();
     d->ssd.worker->destroy_primary_surface(d->ssd.worker, 0);
+    qemu_mutex_lock_iothread();
 }
 
 static void qxl_set_mode(PCIQXLDevice *d, int modenr, int loadvm)