Blame SOURCES/kvm-console-fix-dpy_gfx_replace_surface-assert.patch

4a2fec
From d8e09c7193591639d22c197bf265080cb22c2404 Mon Sep 17 00:00:00 2001
4a2fec
From: Gerd Hoffmann <kraxel@redhat.com>
4a2fec
Date: Fri, 12 Jan 2018 11:30:11 +0100
4a2fec
Subject: [PATCH 01/20] console: fix dpy_gfx_replace_surface assert
4a2fec
MIME-Version: 1.0
4a2fec
Content-Type: text/plain; charset=UTF-8
4a2fec
Content-Transfer-Encoding: 8bit
4a2fec
4a2fec
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
4a2fec
Message-id: <20180112113011.21952-2-kraxel@redhat.com>
4a2fec
Patchwork-id: 78565
4a2fec
O-Subject: [RHV7.5 qemu-kvm-rhev PATCH 1/1] console: fix dpy_gfx_replace_surface assert
4a2fec
Bugzilla: 1505696
4a2fec
RH-Acked-by: John Snow <jsnow@redhat.com>
4a2fec
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
4a2fec
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
4a2fec
4a2fec
virtio-gpu can trigger the assert added by commit "6905b93447 console:
4a2fec
add same surface replace pre-condition" in multihead setups (where
4a2fec
surface can be NULL for secondary displays).  Allow surface being NULL.
4a2fec
4a2fec
Fixes: 6905b93447a42e606dfd126b90f75f4cd3c6fe94
4a2fec
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
4a2fec
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
4a2fec
Message-id: 20170906142109.2685-1-kraxel@redhat.com
4a2fec
(cherry picked from commit 1540008629bbb6a9c0826582d94ecf7a559f784c)
4a2fec
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
4a2fec
---
4a2fec
 ui/console.c | 2 +-
4a2fec
 1 file changed, 1 insertion(+), 1 deletion(-)
4a2fec
4a2fec
diff --git a/ui/console.c b/ui/console.c
4a2fec
index 6967fd4..e92e9e0 100644
4a2fec
--- a/ui/console.c
4a2fec
+++ b/ui/console.c
4a2fec
@@ -1565,7 +1565,7 @@ void dpy_gfx_replace_surface(QemuConsole *con,
4a2fec
     DisplaySurface *old_surface = con->surface;
4a2fec
     DisplayChangeListener *dcl;
4a2fec
 
4a2fec
-    assert(old_surface != surface);
4a2fec
+    assert(old_surface != surface || surface == NULL);
4a2fec
 
4a2fec
     con->surface = surface;
4a2fec
     QLIST_FOREACH(dcl, &s->listeners, next) {
4a2fec
-- 
4a2fec
1.8.3.1
4a2fec