[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stable-7.2.6 61/63] ui: fix crash when there are no active_console
From: |
Michael Tokarev |
Subject: |
[Stable-7.2.6 61/63] ui: fix crash when there are no active_console |
Date: |
Wed, 20 Sep 2023 15:15:46 +0300 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
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@redhat.com>
Reviewed-by: Albert Esteve <aesteve@redhat.com>
(cherry picked from commit 48a35e12faf90a896c5aa4755812201e00d60316)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
diff --git a/ui/console.c b/ui/console.c
index 646202214a..52414d6aa3 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -1697,6 +1697,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;
}
--
2.39.2
- [Stable-7.2.6 00/63] v3 Patch Round-up for stable 7.2.6, freeze on 2023-09-19, Michael Tokarev, 2023/09/20
- [Stable-7.2.6 52/63] virtio: Drop out of coroutine context in virtio_load(), Michael Tokarev, 2023/09/20
- [Stable-7.2.6 54/63] hw/char/riscv_htif: Fix printing of console characters on big endian hosts, Michael Tokarev, 2023/09/20
- [Stable-7.2.6 53/63] arm64: Restore trapless ptimer access, Michael Tokarev, 2023/09/20
- [Stable-7.2.6 55/63] hw/intc: Fix upper/lower mtime write calculation, Michael Tokarev, 2023/09/20
- [Stable-7.2.6 56/63] hw/intc: Make rtc variable names consistent, Michael Tokarev, 2023/09/20
- [Stable-7.2.6 60/63] hw/tpm: TIS on sysbus: Remove unsupport ppi command line option, Michael Tokarev, 2023/09/20
- [Stable-7.2.6 62/63] s390x/ap: fix missing subsystem reset registration, Michael Tokarev, 2023/09/20
- [Stable-7.2.6 61/63] ui: fix crash when there are no active_console,
Michael Tokarev <=
- [Stable-7.2.6 59/63] target/riscv/pmp.c: respect mseccfg.RLB for pmpaddrX changes, Michael Tokarev, 2023/09/20
- [Stable-7.2.6 57/63] linux-user/riscv: Use abi type for target_ucontext, Michael Tokarev, 2023/09/20
- [Stable-7.2.6 58/63] hw/riscv: virt: Fix riscv,pmu DT node path, Michael Tokarev, 2023/09/20
- [Stable-7.2.6 63/63] tpm: fix crash when FD >= 1024 and unnecessary errors due to EINTR, Michael Tokarev, 2023/09/20