summaryrefslogtreecommitdiff
path: root/hw/display
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2015-10-20 09:57:30 +0200
committerGerd Hoffmann <kraxel@redhat.com>2016-03-01 07:51:32 +0100
commit05fa1c742fd6f66978b989ded0dd981ef11c4a0c (patch)
tree6dff18ef0dbaeefe4c446e4c9e25964ad9bde487 /hw/display
parentd2ba7ecb348d3b996fcd920cf1ca7b72722c1dfd (diff)
qxl: lock current_async update in qxl_soft_reset
This should fix a defect report from Coverity. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw/display')
-rw-r--r--hw/display/qxl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index a423deecea..919dc5cd36 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -1156,7 +1156,9 @@ static void qxl_soft_reset(PCIQXLDevice *d)
trace_qxl_soft_reset(d->id);
qxl_check_state(d);
qxl_clear_guest_bug(d);
+ qemu_mutex_lock(&d->async_lock);
d->current_async = QXL_UNDEFINED_IO;
+ qemu_mutex_unlock(&d->async_lock);
if (d->id == 0) {
qxl_enter_vga_mode(d);