From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fFcot-0008HV-4m for qemu-devel@nongnu.org; Mon, 07 May 2018 05:52:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fFcor-0002wj-Ot for qemu-devel@nongnu.org; Mon, 07 May 2018 05:52:35 -0400 From: Gerd Hoffmann Date: Mon, 7 May 2018 11:52:25 +0200 Message-Id: <20180507095225.11659-2-kraxel@redhat.com> In-Reply-To: <20180507095225.11659-1-kraxel@redhat.com> References: <20180507095225.11659-1-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 1/1] qxl: fix local renderer crash List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann , qemu-stable@nongnu.org Make sure we only ask the spice local renderer for display updates in case we have a valid primary surface. Without that spice is confused and throws errors in case a display update request (triggered by screendump for example) happens in parallel to a mode switch and hits the race window where the old primary surface is gone and the new isn't establisted yet. Cc: qemu-stable@nongnu.org Fixes: https://bugzilla.redhat.com//show_bug.cgi?id=3D1567733 Signed-off-by: Gerd Hoffmann Reviewed-by: Marc-Andr=C3=A9 Lureau Message-id: 20180427115528.345-1-kraxel@redhat.com --- hw/display/qxl-render.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/display/qxl-render.c b/hw/display/qxl-render.c index e7ac4f8789..c62b9a5e75 100644 --- a/hw/display/qxl-render.c +++ b/hw/display/qxl-render.c @@ -169,7 +169,8 @@ void qxl_render_update(PCIQXLDevice *qxl) =20 qemu_mutex_lock(&qxl->ssd.lock); =20 - if (!runstate_is_running() || !qxl->guest_primary.commands) { + if (!runstate_is_running() || !qxl->guest_primary.commands || + qxl->mode =3D=3D QXL_MODE_UNDEFINED) { qxl_render_update_area_unlocked(qxl); qemu_mutex_unlock(&qxl->ssd.lock); return; --=20 2.9.3