]> git.proxmox.com Git - mirror_qemu.git/commit - ui/spice-display.c
spice-display: fix qemu_spice_cursor_refresh_bh locking
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 20 Jul 2018 06:31:09 +0000 (08:31 +0200)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 24 Aug 2018 06:40:11 +0000 (08:40 +0200)
commit006bf4641b553565990a6b18e0cff36972a36773
tree7cb7434fe9eeeaa4cddec35da1f1c6033014a05b
parent2480f41e685690511f8f15bbeabb6cdc0b2ddaf0
spice-display: fix qemu_spice_cursor_refresh_bh locking

spice-display should not call the ui/console.c functions dpy_cursor_define
and dpy_moues_set with the SimpleSpiceDisplay lock taken.  That will cause
a deadlock, because the DisplayChangeListener callbacks will take the lock
again.  It is also in general a bad idea to invoke generic callbacks with a
lock taken, because it can cause AB-BA deadlocks in the long run.  The only
thing that requires care is that the cursor may disappear as soon as the
mutex is released, so you need an extra cursor_get/cursor_put pair.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20180720063109.4631-3-pbonzini@redhat.com

[ kraxel: fix dpy_cursor_define() call ]

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/spice-display.c