mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-12 15:52:55 +00:00
unlock the monitor when unwatching the monitor
Steps to reproduce this bug: # virsh qemu-monitor-command domain 'cpu_set 2 online' --hmp The domain has 2 cpus, and we try to set the third cpu online. The qemu crashes, and this command will hang. The reason is that the refs is not 1 when we unwatch the monitor. We lock the monitor, but we do not unlock it. So virCondWait() will be blocked. Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
This commit is contained in:
parent
838f669682
commit
9741f3461b
@ -239,7 +239,8 @@ qemuMonitorUnwatch(void *monitor)
|
||||
qemuMonitorPtr mon = monitor;
|
||||
|
||||
qemuMonitorLock(mon);
|
||||
qemuMonitorUnref(mon);
|
||||
if (qemuMonitorUnref(mon) > 0)
|
||||
qemuMonitorUnlock(mon);
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
x
Reference in New Issue
Block a user