On Fri, Jan 21, 2011 at 04:28:07PM +0800, Wen Congyang wrote: > 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@xxxxxxxxxxxxxx> > > --- > src/qemu/qemu_driver.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c > index 9eb9cd5..ec142e1 100644 > --- a/src/qemu/qemu_driver.c > +++ b/src/qemu/qemu_driver.c > @@ -8789,7 +8789,9 @@ static int doPeer2PeerMigrate(virDomainPtr dom, > cleanup: > VIR_FREE(dom_xml); > /* don't call virConnectClose(), because that resets any pending errors */ > + qemuDomainObjEnterRemoteWithDriver(driver, vm); > virUnrefConnect(dconn); > + qemuDomainObjExitRemoteWithDriver(driver, vm); > > return ret; ACK Daniel -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list