[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [qemu-xen staging-4.19] ui: fix crash when there are no active_console
commit 6c575436cd3e692079fc3e2fe4f54efe77211549 Author: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx> AuthorDate: Mon Sep 11 18:04:47 2023 +0400 Commit: Michael Tokarev <mjt@xxxxxxxxxx> CommitDate: Wed Sep 20 10:18:14 2023 +0300 ui: fix crash when there are no active_console Thread 1 "qemu-system-x86" received signal SIGSEGV, Segmentation fault. 0x0000555555888630 in dpy_ui_info_supported (con=0x0) at ../ui/console.c:812 812 return con->hw_ops->ui_info != NULL; (gdb) bt #0 0x0000555555888630 in dpy_ui_info_supported (con=0x0) at ../ui/console.c:812 #1 0x00005555558a44b1 in protocol_client_msg (vs=0x5555578c76c0, data=0x5555581e93f0 <incomplete sequence \373>, len=24) at ../ui/vnc.c:2585 #2 0x00005555558a19ac in vnc_client_read (vs=0x5555578c76c0) at ../ui/vnc.c:1607 #3 0x00005555558a1ac2 in vnc_client_io (ioc=0x5555581eb0e0, condition=G_IO_IN, opaque=0x5555578c76c0) at ../ui/vnc.c:1635 Fixes: https://issues.redhat.com/browse/RHEL-2600 Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxxx> Reviewed-by: Albert Esteve <aesteve@xxxxxxxxxx> (cherry picked from commit 48a35e12faf90a896c5aa4755812201e00d60316) Signed-off-by: Michael Tokarev <mjt@xxxxxxxxxx> --- ui/console.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/console.c b/ui/console.c index 7461446e71..a327c9f94a 100644 --- a/ui/console.c +++ b/ui/console.c @@ -1707,6 +1707,9 @@ bool dpy_ui_info_supported(QemuConsole *con) if (con == NULL) { con = active_console; } + if (con == NULL) { + return false; + } return con->hw_ops->ui_info != NULL; } -- generated by git-patchbot for /home/xen/git/qemu-xen.git#staging-4.19
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |