qxl: lock current_async update in qxl_soft_reset
PATCH 1/1 qxl: lock current_async update in qxl_soft_reset
Cc Paolo Bonzini <[email protected]>
Signed-off-by Gerd Hoffmann <[email protected]>
--- hw/display/qxl.c | 2 ++ 1 file changed, 2 insertions(+)
hw/display/qxl.c +2 -0
@@ -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);
Signature · 1 line
1.8.3.1
Quoted 12 lines · Gerd Hoffmann
Cc Paolo Bonzini <[email protected]>Signed-off-by Gerd Hoffmann <[email protected]>--- hw/display/qxl.c | 2 ++ 1 file changed, 2 insertions(+)hw/display/qxl.c +0
-0
hw/display/qxl.c static void qxl_soft_reset(PCIQXLDevice *d) · line 1164
Quoted 9 lines
hw/display/qxl.c +2
-0@@ -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);
Thanks, this should fix a defect report from Coverity.
Reviewed-by Paolo Bonzini <[email protected]>