[libvirt] [PATCH RESENT 12/12] libxl: fix deadlock in libxlReconnectDomain
Jim Fehlig
jfehlig at suse.com
Thu May 30 17:48:32 UTC 2013
Marek Marczykowski 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).
>
Looks good, but let's see what others have to say about the
virDomainObjListRemoveLocked() addition.
Regards,
Jim
> ---
> 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 b0f0c6a..687190c 100644
> --- a/src/libxl/libxl_driver.c
> +++ b/src/libxl/libxl_driver.c
> @@ -1060,7 +1060,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);
>
>
More information about the libvir-list
mailing list