Blame SOURCES/kvm-qxl-fix-local-renderer-crash.patch

357786
From e79d4d03368f7346249033e0f5ad2732228852ca Mon Sep 17 00:00:00 2001
357786
From: Gerd Hoffmann <kraxel@redhat.com>
357786
Date: Wed, 13 Jun 2018 13:15:57 +0200
357786
Subject: [PATCH 02/89] qxl: fix local renderer crash
357786
MIME-Version: 1.0
357786
Content-Type: text/plain; charset=UTF-8
357786
Content-Transfer-Encoding: 8bit
357786
357786
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
357786
Message-id: <20180613131557.12255-2-kraxel@redhat.com>
357786
Patchwork-id: 80662
357786
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH 1/1] qxl: fix local renderer crash
357786
Bugzilla: 1567733
357786
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
357786
RH-Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
357786
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
357786
357786
Make sure we only ask the spice local renderer for display updates in
357786
case we have a valid primary surface.  Without that spice is confused
357786
and throws errors in case a display update request (triggered by
357786
screendump for example) happens in parallel to a mode switch and hits
357786
the race window where the old primary surface is gone and the new isn't
357786
establisted yet.
357786
357786
Cc: qemu-stable@nongnu.org
357786
Fixes: https://bugzilla.redhat.com//show_bug.cgi?id=1567733
357786
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
357786
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
357786
Message-id: 20180427115528.345-1-kraxel@redhat.com
357786
(cherry picked from commit 5bd5c27c7d284d01477c5cc022ce22438c46bf9f)
357786
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
357786
---
357786
 hw/display/qxl-render.c | 3 ++-
357786
 1 file changed, 2 insertions(+), 1 deletion(-)
357786
357786
diff --git a/hw/display/qxl-render.c b/hw/display/qxl-render.c
357786
index e7ac4f8..c62b9a5 100644
357786
--- a/hw/display/qxl-render.c
357786
+++ b/hw/display/qxl-render.c
357786
@@ -169,7 +169,8 @@ void qxl_render_update(PCIQXLDevice *qxl)
357786
 
357786
     qemu_mutex_lock(&qxl->ssd.lock);
357786
 
357786
-    if (!runstate_is_running() || !qxl->guest_primary.commands) {
357786
+    if (!runstate_is_running() || !qxl->guest_primary.commands ||
357786
+        qxl->mode == QXL_MODE_UNDEFINED) {
357786
         qxl_render_update_area_unlocked(qxl);
357786
         qemu_mutex_unlock(&qxl->ssd.lock);
357786
         return;
357786
-- 
357786
1.8.3.1
357786