[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 1/2] monitor: guard iothread access by mon->use_io_t

From: Wolfgang Bumiller
Subject: [Qemu-devel] [PATCH 1/2] monitor: guard iothread access by mon->use_io_thread
Date: Fri, 21 Sep 2018 10:28:55 +0200

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: Wolfgang Bumiller <address@hidden>
 monitor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/monitor.c b/monitor.c
index 021c11b1bf..4802148c82 100644
--- a/monitor.c
+++ b/monitor.c
@@ -4380,7 +4380,7 @@ int monitor_suspend(Monitor *mon)
-    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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]