summaryrefslogtreecommitdiffstats
path: root/include/qemu/path.h
diff options
context:
space:
mode:
authorMarc-André Lureau2018-12-05 21:37:36 +0100
committerMarkus Armbruster2018-12-12 09:55:57 +0100
commit8dac00bbfbca1fa793b8ad410a4373e97599102d (patch)
tree5522fed1781b37dc260b68024729b6d7b0d1f0d0 /include/qemu/path.h
parentcolo: check chardev can switch context (diff)
downloadqemu-8dac00bbfbca1fa793b8ad410a4373e97599102d.tar.gz
qemu-8dac00bbfbca1fa793b8ad410a4373e97599102d.tar.xz
qemu-8dac00bbfbca1fa793b8ad410a4373e97599102d.zip
monitor: prevent inserting new monitors after cleanup
monitor_cleanup() is one of the last things main() calls before it returns. In the following patch, monitor_cleanup() will release the monitor_lock during flushing. There may be pending commands to insert new monitors, which would modify the mon_list during iteration, and the clean-up could thus miss those new insertions. Add a monitor_destroyed global to check if monitor_cleanup() has been already called. In this case, don't insert the new monitor in the list, but free it instead. A cleaner solution would involve the main thread telling other threads to terminate, waiting for their termination. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Message-Id: <20181205203737.9011-7-marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'include/qemu/path.h')
0 files changed, 0 insertions, 0 deletions