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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxx>
> ---
>  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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]