From: Wang Yechao Date: Fri, 21 Sep 2018 04:35:11 +0000 (+0800) Subject: qemu: Fix deadlock if create qemuProcessReconnect thread failed X-Git-Tag: v4.8.0-rc1~97 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fad65432ced7f5b419c7f9aa92264b0c01b3421b;p=thirdparty%2Flibvirt.git qemu: Fix deadlock if create qemuProcessReconnect thread failed Use the new qemuDomainRemoveInactiveJobLocked to remove the @obj during the virDomainObjListForEach call which holds a lock on the domain object list. Signed-off-by: Wang Yechao Reviewed-by: John Ferlan --- diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index f9a01daee7..711db105be 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -8033,7 +8033,7 @@ qemuProcessReconnectHelper(virDomainObjPtr obj, */ qemuProcessStop(src->driver, obj, VIR_DOMAIN_SHUTOFF_FAILED, QEMU_ASYNC_JOB_NONE, 0); - qemuDomainRemoveInactiveJob(src->driver, obj); + qemuDomainRemoveInactiveJobLocked(src->driver, obj); virDomainObjEndAPI(&obj); virNWFilterUnlockFilterUpdates();