[libvirt] [PATCH] qemu: fix msg could be a wild pointer in qemuMonitorIOProcess()

2018-06-20 Thread Weilun Zhu
;msg to NULL. Signed-off-by: Weilun Zhu --- src/qemu/qemu_monitor.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c index d6771c1d52..6ed475ede0 100644 --- a/src/qemu/qemu_monitor.c +++ b/src/qemu/qemu_monitor.c @@ -4

[libvirt] [PATCH v2] qemu: fix msg could be a wild pointer in qemuMonitorIOProcess()

2018-06-07 Thread Weilun Zhu
As qemuMonitorJSONIOProcess() will unlock the qemu monitor, there is some extreme situation, eg qemu send message to monitor twice in a short time, where the local viriable 'msg' of qemuMonitorIOProcess() could be a wild point: 1. qemuMonitorSend() assign mon->msg to parameter 'msg', which is

[libvirt] [PATCH v2] As qemuMonitorJSONIOProcess() will unlock the qemu monitor, there is some extreme situation, eg qemu send message to monitor twice in a short time, where the local viriable 'msg'

2018-06-06 Thread Weilun Zhu
1. qemuMonitorSend() assign mon->msg to parameter 'msg', which is alse a local variable of its caller qemuMonitorJSONCommandWithFd(), cause eventloop to send message to monitor, then wait condition. 2. qemu send message to monitor for the first time immediately. 3. qemuMonitorIOProcess() is