[libvirt] [PATCH] qemu_conf: Properly mark driver->config as self-locking APIs
Eric Blake
eblake at redhat.com
Wed Jul 17 01:18:12 UTC 2013
On 07/16/2013 12:25 PM, Michal Privoznik wrote:
> Since a9e97e0c we don't require driver->config, or
> virQEMUDriverGetConfig() to be called with locked QEMU driver. In fact,
> calling it with the driver locked would cause deadlock. Hence, the
> annotation to the struct field is not right.
> ---
> src/qemu/qemu_conf.h | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
ACK, although you may want danpb to also chime in.
>
> diff --git a/src/qemu/qemu_conf.h b/src/qemu/qemu_conf.h
> index 8229cfc..fd5cc57 100644
> --- a/src/qemu/qemu_conf.h
> +++ b/src/qemu/qemu_conf.h
> @@ -160,8 +160,7 @@ struct _virQEMUDriverConfig {
> struct _virQEMUDriver {
> virMutex lock;
>
> - /* Require lock to get reference on 'config',
> - * then lockless thereafter */
> + /* Immutable pointer, self-locking APIs */
> virQEMUDriverConfigPtr config;
>
> /* Immutable pointer, self-locking APIs */
>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 621 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130716/2c3e40d3/attachment-0001.sig>
More information about the libvir-list
mailing list