Skip to contentSkip to conversation

qxl: fix segfault

PATCH In review Gerd Hoffmann 3 participants 5 messages Nov 24, 2020 – Nov 27, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qxl: fix segfault

Add missing sanity check.
Reproducer: run qemu with "-device qxl" but without "-spice ..."

Fixes 0d9b90ce5c73 ("console: make QMP/HMP screendump run in coroutine")
---
 ui/console.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
ui/console.c +3 -1
index e07d2c380df7..53dee8e26b17 100644
@@ -264,7 +264,9 @@ static void gui_setup_refresh(DisplayState *ds)
 
 void graphic_hw_update_done(QemuConsole *con)
 {
-    qemu_co_queue_restart_all(&con->dump_queue);
+    if (con) {
+        qemu_co_queue_restart_all(&con->dump_queue);
+    }
 }
 
 void graphic_hw_update(QemuConsole *con)
Signature · 1 line
2.27.0
Reviewed-by on v1 1/1
#1 lore raw

Hi

Quoted 25 lines · Gerd Hoffmann

Add missing sanity check.
Reproducer: run qemu with "-device qxl" but without "-spice ..."

Fixes 0d9b90ce5c73 ("console: make QMP/HMP screendump run in coroutine")
---
 ui/console.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
ui/console.c +3 -2
index e07d2c380df7..53dee8e26b17 100644
@@ -264,7 +264,9 @@ static void gui_setup_refresh(DisplayState *ds)
 
 void graphic_hw_update_done(QemuConsole *con)
 {
-    qemu_co_queue_restart_all(&con->dump_queue);
+    if (con) {
+        qemu_co_queue_restart_all(&con->dump_queue);
+    }
 }
 
 void graphic_hw_update(QemuConsole *con)
--
Quoted 4 lines

2.27.0

Interesting case...

thanks

Signature · 1 line
Marc-André Lureau
#2 lore raw
In reply to Gerd Hoffmann

Hi

Quoted 6 lines · Gerd Hoffmann

Add missing sanity check.
Reproducer: run qemu with "-device qxl" but without "-spice ..."

Fixes 0d9b90ce5c73 ("console: make QMP/HMP screendump run in coroutine")

It would be nice to include this regression fix in the release. Anyone taking the patch to PR?

---

Quoted 23 lines
 ui/console.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
ui/console.c +3 -2
index e07d2c380df7..53dee8e26b17 100644
@@ -264,7 +264,9 @@ static void gui_setup_refresh(DisplayState *ds)
 
 void graphic_hw_update_done(QemuConsole *con)
 {
-    qemu_co_queue_restart_all(&con->dump_queue);
+    if (con) {
+        qemu_co_queue_restart_all(&con->dump_queue);
+    }
 }
 
 void graphic_hw_update(QemuConsole *con)
--

2.27.0

Signature · 1 line
Marc-André Lureau
#3 lore raw
Quoted 5 lines · Marc-André Lureau

Hi

Quoted 1 line · Gerd Hoffmann
Quoted 8 lines
Quoted 5 lines

Add missing sanity check.
Reproducer: run qemu with "-device qxl" but without "-spice ..."

Fixes 0d9b90ce5c73 ("console: make QMP/HMP screendump run in coroutine")

It would be nice to include this regression fix in the release. Anyone taking the patch to PR?

Looks like a safe fix and we do need to roll rc4 anyway, so if somebody wants to send a pullreq tomorrow I can apply it.

thanks
-- PMM

#4 lore raw

Hi,

Quoted 4 lines
Quoted 1 line

It would be nice to include this regression fix in the release. Anyone taking the patch to PR?

Looks like a safe fix and we do need to roll rc4 anyway, so if somebody wants to send a pullreq tomorrow I can apply it.

I had one prepared already and was waiting for ci.

Sent now,
Gerd