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

Re: [libvirt] [PATCH] nwfilter: Add missing driver lock in qemu driver



On 05/14/2010 11:39 AM, Stefan Berger wrote:
> This adds a missing driver lock in the qemu driver to protect
> the list of domains.
> 
> Signed-off-by: Stefan Berger <stefanb us ibm com>
> 
> ---
>  src/qemu/qemu_driver.c |    8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> Index: libvirt-acl/src/qemu/qemu_driver.c
> ===================================================================
> --- libvirt-acl.orig/src/qemu/qemu_driver.c
> +++ libvirt-acl/src/qemu/qemu_driver.c
> @@ -11869,11 +11869,15 @@ static virStateDriver qemuStateDriver = 
>  };
>  
>  static int
> -qemudVMFilterRebuild(virConnectPtr conn,
> +qemudVMFilterRebuild(virConnectPtr conn ATTRIBUTE_UNUSED,
>                       virHashIterator iter, void *data)
>  {
> -    (void)conn;
> +    struct qemud_driver *driver = qemu_driver;
> +
> +    qemuDriverLock(driver);
>      virHashForEach(qemu_driver->domains.objs, iter, data);
> +    qemuDriverUnlock(driver);
> +
>      return 0;

ACK.

-- 
Eric Blake   eblake redhat com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


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