render / rpms / qemu

Forked from rpms/qemu 5 months ago
Clone

Blame 0001-qxl-fix-local-renderer-crash.patch

330481
From 5bd5c27c7d284d01477c5cc022ce22438c46bf9f Mon Sep 17 00:00:00 2001
330481
Message-Id: <5bd5c27c7d284d01477c5cc022ce22438c46bf9f.1528219523.git.crobinso@redhat.com>
330481
From: Gerd Hoffmann <kraxel@redhat.com>
330481
Date: Fri, 27 Apr 2018 13:55:28 +0200
330481
Subject: [PATCH] qxl: fix local renderer crash
330481
MIME-Version: 1.0
330481
Content-Type: text/plain; charset=UTF-8
330481
Content-Transfer-Encoding: 8bit
330481
330481
Make sure we only ask the spice local renderer for display updates in
330481
case we have a valid primary surface.  Without that spice is confused
330481
and throws errors in case a display update request (triggered by
330481
screendump for example) happens in parallel to a mode switch and hits
330481
the race window where the old primary surface is gone and the new isn't
330481
establisted yet.
330481
330481
Cc: qemu-stable@nongnu.org
330481
Fixes: https://bugzilla.redhat.com//show_bug.cgi?id=1567733
330481
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
330481
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
330481
Message-id: 20180427115528.345-1-kraxel@redhat.com
330481
Signed-off-by: Cole Robinson <crobinso@redhat.com>
330481
---
330481
 hw/display/qxl-render.c | 3 ++-
330481
 1 file changed, 2 insertions(+), 1 deletion(-)
330481
330481
diff --git a/hw/display/qxl-render.c b/hw/display/qxl-render.c
330481
index e7ac4f8789..c62b9a5e75 100644
330481
--- a/hw/display/qxl-render.c
330481
+++ b/hw/display/qxl-render.c
330481
@@ -169,7 +169,8 @@ void qxl_render_update(PCIQXLDevice *qxl)
330481
 
330481
     qemu_mutex_lock(&qxl->ssd.lock);
330481
 
330481
-    if (!runstate_is_running() || !qxl->guest_primary.commands) {
330481
+    if (!runstate_is_running() || !qxl->guest_primary.commands ||
330481
+        qxl->mode == QXL_MODE_UNDEFINED) {
330481
         qxl_render_update_area_unlocked(qxl);
330481
         qemu_mutex_unlock(&qxl->ssd.lock);
330481
         return;
330481
-- 
330481
2.17.1
330481