qemu/monitor
Andrey Drobyshev 03f50d7ee7 monitor: don't wake up qmp_dispatcher_co coroutine upon cleanup
Since the commit 3e6bed61 ("monitor: cleanup detection of qmp_dispatcher_co
shutting down"), coroutine pointer qmp_dispatcher_co is set to NULL upon
cleanup.  If a QMP command is sent after monitor_cleanup() (e.g. after
shutdown), this may lead to SEGFAULT on aio_co_wake(NULL).

As mentioned in the comment inside monitor_cleanup(), the intention is to
allow incoming requests while shutting down, but simply leave them
without any response.  Let's do exactly that, and if qmp_dispatcher_co
coroutine pointer has already been set to NULL, let's simply skip the
aio_co_wake() part.

Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Link: https://lore.kernel.org/r/20250502214729.928380-2-andrey.drobyshev@virtuozzo.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-05-02 23:51:30 +02:00
..
fds.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
hmp-cmds-target.c exec/cpu-all: remove exec/target_page include 2025-04-23 15:04:57 -07:00
hmp-cmds.c include/system: Move exec/ioport.h to system/ioport.h 2025-04-23 14:08:21 -07:00
hmp-target.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
hmp.c qapi: Move include/qapi/qmp/ to include/qobject/ 2025-02-10 15:33:16 +01:00
meson.build util/qemu-config: Extract QMP commands to qemu-config-qmp.c 2024-04-18 11:17:27 +02:00
monitor-internal.h qapi: Move and rename qapi/qmp/dispatch.h to qapi/qmp-registry.h 2025-02-10 15:33:29 +01:00
monitor.c qapi: Move include/qapi/qmp/ to include/qobject/ 2025-02-10 15:33:16 +01:00
qemu-config-qmp.c qapi: Move include/qapi/qmp/ to include/qobject/ 2025-02-10 15:33:16 +01:00
qmp-cmds-control.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
qmp-cmds.c migration/block: Rewrite disk activation 2025-01-09 17:38:57 -03:00
qmp.c monitor: don't wake up qmp_dispatcher_co coroutine upon cleanup 2025-05-02 23:51:30 +02:00
trace-events docs: fix references to docs/devel/tracing.rst 2021-06-02 06:51:09 +02:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00