提交 1d763265 编写于 作者: M Marek Marczykowski-Górecki 提交者: Jim Fehlig

libxl: fix deadlock in libxlReconnectDomain

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: NMarek Marczykowski-Górecki <marmarek@invisiblethingslab.com>
上级 8f65fcb4
...@@ -1117,7 +1117,7 @@ libxlReconnectDomain(virDomainObjPtr vm, ...@@ -1117,7 +1117,7 @@ libxlReconnectDomain(virDomainObjPtr vm,
out: out:
libxlVmCleanup(driver, vm, VIR_DOMAIN_SHUTOFF_UNKNOWN); libxlVmCleanup(driver, vm, VIR_DOMAIN_SHUTOFF_UNKNOWN);
if (!vm->persistent) if (!vm->persistent)
virDomainObjListRemove(driver->domains, vm); virDomainObjListRemoveLocked(driver->domains, vm);
else else
virObjectUnlock(vm); virObjectUnlock(vm);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册