提交 9a3e52e3 编写于 作者: W Wolfgang Bumiller 提交者: Markus Armbruster

monitor: guard iothread access by mon->use_io_thread

monitor_resume() and monitor_suspend() both want to
"kick" the I/O thread if it is there, but in
monitor_suspend() lacked the use_io_thread flag condition.
This is required when we later only spawn the thread on
first use.
Signed-off-by: NWolfgang Bumiller <w.bumiller@proxmox.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
Reviewed-by: NPeter Xu <peterx@redhat.com>
Message-Id: <20180925081507.11873-2-w.bumiller@proxmox.com>
Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
上级 0ca70f19
......@@ -4292,7 +4292,7 @@ int monitor_suspend(Monitor *mon)
atomic_inc(&mon->suspend_cnt);
if (monitor_is_qmp(mon)) {
if (monitor_is_qmp(mon) && mon->use_io_thread) {
/*
* Kick I/O thread to make sure this takes effect. It'll be
* evaluated again in prepare() of the watch object.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册