]> git.proxmox.com Git - pve-qemu.git/blob - debian/patches/extra/0001-monitor-guard-iothread-access-by-mon-use_io_thread.patch
bump version to 3.0.1-1
[pve-qemu.git] / debian / patches / extra / 0001-monitor-guard-iothread-access-by-mon-use_io_thread.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Wolfgang Bumiller <w.bumiller@proxmox.com>
3 Date: Tue, 25 Sep 2018 10:15:06 +0200
4 Subject: [PATCH] monitor: guard iothread access by mon->use_io_thread
5
6 monitor_resume() and monitor_suspend() both want to
7 "kick" the I/O thread if it is there, but in
8 monitor_suspend() lacked the use_io_thread flag condition.
9 This is required when we later only spawn the thread on
10 first use.
11
12 Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
13 Reviewed-by: Eric Blake <eblake@redhat.com>
14 Reviewed-by: Peter Xu <peterx@redhat.com>
15 Message-Id: <20180925081507.11873-2-w.bumiller@proxmox.com>
16 Signed-off-by: Markus Armbruster <armbru@redhat.com>
17 ---
18 monitor.c | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21 diff --git a/monitor.c b/monitor.c
22 index a1999e396c..836c0bbdaa 100644
23 --- a/monitor.c
24 +++ b/monitor.c
25 @@ -4376,7 +4376,7 @@ int monitor_suspend(Monitor *mon)
26
27 atomic_inc(&mon->suspend_cnt);
28
29 - if (monitor_is_qmp(mon)) {
30 + if (monitor_is_qmp(mon) && mon->use_io_thread) {
31 /*
32 * Kick I/O thread to make sure this takes effect. It'll be
33 * evaluated again in prepare() of the watch object.
34 --
35 2.11.0
36