[libvirt] [PATCH 2/2] libxl: don't unlock virDomainObj if refcnt is 0

Joao Martins joao.m.martins at oracle.com
Thu Nov 19 12:54:41 UTC 2015



On 11/18/2015 10:47 PM, Jim Fehlig wrote:
> Commit 6472e54a unlocks the virDomainObj even if libxlDomainObjEndJob
> returns false, indicating that its refcnt has dropped to 0.
> 
> Signed-off-by: Jim Fehlig <jfehlig at suse.com>
> ---
>  src/libxl/libxl_driver.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
> index 4609c00..d77a0e4 100644
> --- a/src/libxl/libxl_driver.c
> +++ b/src/libxl/libxl_driver.c
> @@ -4816,10 +4816,8 @@ libxlDomainMemoryStats(virDomainPtr dom,
>      libxl_dominfo_dispose(&d_info);
>  
>   endjob:
> -    if (!libxlDomainObjEndJob(driver, vm)) {
> -        virObjectUnlock(vm);
> +    if (!libxlDomainObjEndJob(driver, vm))
>          vm = NULL;
> -    }
>  
>   cleanup:
>      if (vm)
> 
And it looks this mistake is also on all patches that use libxlDomainObjEndJob
so will fix that on the next version (interface, block, getalldomainstats.

Regards,
Joao




More information about the libvir-list mailing list