aboutsummaryrefslogtreecommitdiff
path: root/include/disas/dis-asm.h
diff options
context:
space:
mode:
authorStefan Reiter <s.reiter@proxmox.com>2021-03-22 16:40:24 +0100
committerMarkus Armbruster <armbru@redhat.com>2021-05-12 17:29:11 +0200
commita67b996e7894edfafbcd3fd007c9f58f26d25908 (patch)
treee5f1379daffd2c1357685a4dc872dcd0ff9a9b80 /include/disas/dis-asm.h
parenta5ccdccc97d6e0d75282ede5b866cf694e9602b0 (diff)
downloadqemu-a67b996e7894edfafbcd3fd007c9f58f26d25908.zip
qemu-a67b996e7894edfafbcd3fd007c9f58f26d25908.tar.gz
qemu-a67b996e7894edfafbcd3fd007c9f58f26d25908.tar.bz2
monitor/qmp: fix race on CHR_EVENT_CLOSED without OOB
The QMP dispatcher coroutine holds the qmp_queue_lock over a yield point, where it expects to be rescheduled from the main context. If a CHR_EVENT_CLOSED event is received just then, it can race and block the main thread on the mutex in monitor_qmp_cleanup_queue_and_resume. monitor_resume does not need to be called from main context, so we can call it immediately after popping a request from the queue, which allows us to drop the qmp_queue_lock mutex before yielding. Suggested-by: Wolfgang Bumiller <w.bumiller@proxmox.com> Signed-off-by: Stefan Reiter <s.reiter@proxmox.com> Message-Id: <20210322154024.15011-1-s.reiter@proxmox.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Cc: qemu-stable@nongnu.org Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'include/disas/dis-asm.h')
0 files changed, 0 insertions, 0 deletions