* [Qemu-devel] [PATCH] qxl: lock current_async update in qxl_soft_reset
@ 2015-10-20 7:58 Gerd Hoffmann
2015-10-20 12:13 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: Gerd Hoffmann @ 2015-10-20 7:58 UTC (permalink / raw)
To: qemu-devel; +Cc: Paolo Bonzini, Gerd Hoffmann
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/display/qxl.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index 9c961da..20dc72e 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);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] qxl: lock current_async update in qxl_soft_reset
2015-10-20 7:58 [Qemu-devel] [PATCH] qxl: lock current_async update in qxl_soft_reset Gerd Hoffmann
@ 2015-10-20 12:13 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2015-10-20 12:13 UTC (permalink / raw)
To: Gerd Hoffmann, qemu-devel
On 20/10/2015 09:58, Gerd Hoffmann wrote:
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> hw/display/qxl.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/hw/display/qxl.c b/hw/display/qxl.c
> index 9c961da..20dc72e 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);
>
Thanks, this should fix a defect report from Coverity.
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-20 12:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-20 7:58 [Qemu-devel] [PATCH] qxl: lock current_async update in qxl_soft_reset Gerd Hoffmann
2015-10-20 12:13 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).