Re: [PATCH] virConnectUnregisterCloseCallback: Unlock @conn prior to error dispatch

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

 



On 01/07/2014 10:25 AM, Michal Privoznik wrote:
> The function checks for @conn to be valid and locks its mutex. Then, it
> checks if callee is unregistering the same callback that he registered
> previously. If this fails an error is reported and  the control jumps to
> 'error' label. Here, if @conn has some errors (and it certainly does -
> the one that's been just reported) the conn->mutex is locked again -
> without any previous unlock:

ACK; bug introduced in commit ca0ea2a.

> +++ b/src/libvirt.c
> @@ -21022,9 +21022,9 @@ virConnectUnregisterCloseCallback(virConnectPtr conn,
>      return 0;
>  
>  error:
> -    virDispatchError(conn);
>      virObjectUnlock(conn->closeCallback);
>      virMutexUnlock(&conn->lock);
> +    virDispatchError(conn);
>      return -1;
>  }
>  
> 

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
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]