From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55747) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaeYr-0006oY-Bj for qemu-devel@nongnu.org; Tue, 01 Mar 2016 02:17:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aaeYp-0003Qs-2E for qemu-devel@nongnu.org; Tue, 01 Mar 2016 02:17:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42507) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aaeYo-0003Qm-T8 for qemu-devel@nongnu.org; Tue, 01 Mar 2016 02:17:34 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 9AD19C0006F1 for ; Tue, 1 Mar 2016 07:17:34 +0000 (UTC) From: Gerd Hoffmann Date: Tue, 1 Mar 2016 08:17:29 +0100 Message-Id: <1456816649-4713-3-git-send-email-kraxel@redhat.com> In-Reply-To: <1456816649-4713-1-git-send-email-kraxel@redhat.com> References: <1456816649-4713-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PULL 2/2] qxl: lock current_async update in qxl_soft_reset List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann 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(+) 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); -- 1.8.3.1