summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2015-10-20 09:57:30 +0200
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:46:50 -0600
commitfcad8dfe74cd71f47abf08e4bea7ad6343eeee19 (patch)
treef8ec56a4432a0a8976d52e8cf7b2027464c855f2
parent5871b5d7ab342f37c165eb2380f3cba0d3d3579d (diff)
downloadhqemu-fcad8dfe74cd71f47abf08e4bea7ad6343eeee19.zip
hqemu-fcad8dfe74cd71f47abf08e4bea7ad6343eeee19.tar.gz
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>
-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 a423dee..919dc5c 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);
OpenPOWER on IntegriCloud