aboutsummaryrefslogtreecommitdiff
path: root/qapi
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2018-12-06 00:37:36 +0400
committerMarkus Armbruster <armbru@redhat.com>2018-12-12 09:55:57 +0100
commit8dac00bbfbca1fa793b8ad410a4373e97599102d (patch)
tree5522fed1781b37dc260b68024729b6d7b0d1f0d0 /qapi
parent269d25cdeb3acecf0033d6809dd7e23ebbc78ce9 (diff)
downloadqemu-8dac00bbfbca1fa793b8ad410a4373e97599102d.zip
qemu-8dac00bbfbca1fa793b8ad410a4373e97599102d.tar.gz
qemu-8dac00bbfbca1fa793b8ad410a4373e97599102d.tar.bz2
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 'qapi')
0 files changed, 0 insertions, 0 deletions