Re: [PATCH v6 4/4] nodedev: Remove driver locks around object list mgmt code

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

 



On Thu, Jul 20, 2017 at 10:08:15AM -0400, John Ferlan wrote:
> Since virnodedeviceobj now has a self-lockable hash table, there's no
> need to lock the table from the driver for processing. Thus remove the
> locks from the driver for NodeDeviceObjList mgmt.
>
> This includes the test driver as well.
>
> Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>

...

>
>      /* Populate with known devices */

^This comment should come after the unlock, so it's 100% clear it's linked to
the udevEnumerateDevices call.

> -
> +    nodeDeviceUnlock();
>      if (udevEnumerateDevices(udev) != 0)
>          goto cleanup;
>
> -    ret = 0;
> +    return 0;
>
>   cleanup:
>      nodeDeviceUnlock();
> -
> -    if (ret == -1)
> -        nodeStateCleanup();
> -    return ret;
> +    nodeStateCleanup();
> +    return -1;
>  }
>

The patch is straightforward, if there is a spot where you forgot to handle the
locks in a similar manner and I missed it, either I will hit it with my
follow-up "mdev nodedev-list kernel race" series or someone else eventually
will :).

ACK to 1,2 and this one, I had some comments to 3, but ACK'd it in principle.

Erik

--
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]
  Powered by Linux