mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
qemu: Fix a possible deadlock in p2p migration
The function virUnrefConnect() may call virReleaseConnect() to release the dest connection, and the function virReleaseConnect() will call conn->driver->close(). So the function virUnrefConnect() should be surrounded by qemuDomainObjEnterRemoteWithDriver() and qemuDomainObjExitRemoteWithDriver() to prevent possible deadlock between two communicating libvirt daemons. See commit f0c8e1cb3774d6f09e2681ca1988bf235a343007 for further details. Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
This commit is contained in:
parent
3703c3fed4
commit
bda57661b8
@ -8790,7 +8790,9 @@ static int doPeer2PeerMigrate(virDomainPtr dom,
|
|||||||
cleanup:
|
cleanup:
|
||||||
VIR_FREE(dom_xml);
|
VIR_FREE(dom_xml);
|
||||||
/* don't call virConnectClose(), because that resets any pending errors */
|
/* don't call virConnectClose(), because that resets any pending errors */
|
||||||
|
qemuDomainObjEnterRemoteWithDriver(driver, vm);
|
||||||
virUnrefConnect(dconn);
|
virUnrefConnect(dconn);
|
||||||
|
qemuDomainObjExitRemoteWithDriver(driver, vm);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user