qemu/monitor
Wolfgang Bumiller 2895aaa139 monitor/qmp: resume monitor when clearing its queue
When a monitor's queue is filled up in handle_qmp_command()
it gets suspended. It's the dispatcher bh's job currently to
resume the monitor, which it does after processing an event
from the queue. However, it is possible for a
CHR_EVENT_CLOSED event to be processed before before the bh
is scheduled, which will clear the queue without resuming
the monitor, thereby preventing the dispatcher from reaching
the resume() call.
Any new connections to the qmp socket will be accept()ed and
show the greeting, but will not respond to any messages sent
afterwards (as they will not be read from the
still-suspended socket).
Fix this by resuming the monitor when clearing a queue which
was filled up.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Message-Id: <20191115085914.21287-1-w.bumiller@proxmox.com>
2019-11-19 08:21:47 +01:00
..
Makefile.objs monitor: Split out monitor/monitor.c 2019-06-18 08:14:17 +02:00
hmp-cmds.c qdev: Collect HMP handlers command handlers in qdev-monitor.c 2019-08-21 13:24:01 +02:00
hmp.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
misc.c core: replace getpagesize() with qemu_real_host_page_size 2019-10-26 15:38:06 +02:00
monitor-internal.h Include generated QAPI headers less 2019-08-16 13:31:51 +02:00
monitor.c Clean up inclusion of sysemu/sysemu.h 2019-08-16 13:31:53 +02:00
qmp-cmds.c sysemu: Split sysemu/runstate.h off sysemu/sysemu.h 2019-08-16 13:37:36 +02:00
qmp.c monitor/qmp: resume monitor when clearing its queue 2019-11-19 08:21:47 +01:00
trace-events monitor: Split out monitor/monitor.c 2019-06-18 08:14:17 +02:00