On 06/12/2013 07:54 PM, Marek Marczykowski-Górecki wrote:
Use virDomainObjListRemoveLocked instead of virDomainObjListRemove,
as
driver->domains is already taken by virDomainObjListForEach.
Above deadlock can be triggered when libvirtd is started after some
domain have been started by hand (in which case driver will not find
libvirt-xml domain config).
Signed-off-by: Marek Marczykowski-Górecki <marmarek(a)invisiblethingslab.com>
---
src/libxl/libxl_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index df31001..b2cff5b 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -1100,7 +1100,7 @@ libxlReconnectDomain(virDomainObjPtr vm,
out:
libxlVmCleanup(driver, vm, VIR_DOMAIN_SHUTOFF_UNKNOWN);
if (!vm->persistent)
- virDomainObjListRemove(driver->domains, vm);
+ virDomainObjListRemoveLocked(driver->domains, vm);
else
virObjectUnlock(vm);
Trivial once 6/14 ACK'ed.
ACK and pushed.
Regards,
Jim