From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59987) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoVnj-0007jU-RT for qemu-devel@nongnu.org; Tue, 20 Oct 2015 08:14:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZoVnf-0002tL-RD for qemu-devel@nongnu.org; Tue, 20 Oct 2015 08:13:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45869) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZoVnf-0002t6-LM for qemu-devel@nongnu.org; Tue, 20 Oct 2015 08:13:55 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 28FA391D11 for ; Tue, 20 Oct 2015 12:13:55 +0000 (UTC) References: <1445327912-29944-1-git-send-email-kraxel@redhat.com> From: Paolo Bonzini Message-ID: <56262FFE.5030200@redhat.com> Date: Tue, 20 Oct 2015 14:13:50 +0200 MIME-Version: 1.0 In-Reply-To: <1445327912-29944-1-git-send-email-kraxel@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] qxl: lock current_async update in qxl_soft_reset List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann , qemu-devel@nongnu.org On 20/10/2015 09:58, Gerd Hoffmann wrote: > Cc: Paolo Bonzini > Signed-off-by: Gerd Hoffmann > --- > 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