Skip to content
Snippets Groups Projects
user avatar
Stefan Reiter authored
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: default avatarWolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: default avatarStefan Reiter <s.reiter@proxmox.com>
Message-Id: <20210322154024.15011-1-s.reiter@proxmox.com>
Reviewed-by: default avatarKevin Wolf <kwolf@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: default avatarMarkus Armbruster <armbru@redhat.com>
a67b996e
History
Name Last commit Last update
..