From 05fa1c742fd6f66978b989ded0dd981ef11c4a0c Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Tue, 20 Oct 2015 09:57:30 +0200 Subject: qxl: lock current_async update in qxl_soft_reset This should fix a defect report from Coverity. Signed-off-by: Gerd Hoffmann Reviewed-by: Paolo Bonzini --- hw/display/qxl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'hw/display') 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); -- cgit v1.2.3