Re: [PATCH v6 5/9] nodedev: udev: Unlock the private data before setting up 'system' node

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

 



On Wed, Oct 18, 2017 at 05:13:41PM -0400, John Ferlan wrote:
>
>
> On 10/18/2017 09:52 AM, Erik Skultety wrote:
> > udevSetupSystemDev only needs the udev data lock to be locked because of
> > calling udevGetDMIData which accesses some protected structure members,
> > but it can do that on its own just fine, no need to hold the lock the
> > whole time.
> >
> > Signed-off-by: Erik Skultety <eskultet@xxxxxxxxxx>
> > ---
> >  src/node_device/node_device_udev.c | 8 +++++---
> >  1 file changed, 5 insertions(+), 3 deletions(-)
> >
> > diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c
> > index e0e5ba799..6882517e6 100644
> > --- a/src/node_device/node_device_udev.c
> > +++ b/src/node_device/node_device_udev.c
> > @@ -1719,6 +1719,7 @@ udevGetDMIData(virNodeDevCapSystemPtr syscap)
> >      virNodeDevCapSystemHardwarePtr hardware = &syscap->hardware;
> >      virNodeDevCapSystemFirmwarePtr firmware = &syscap->firmware;
> >
> > +    virObjectLock(priv);
> >      udev = udev_monitor_get_udev(priv->udev_monitor);
> >
> >      device = udev_device_new_from_syspath(udev, DMI_DEVPATH);
> > @@ -1731,6 +1732,7 @@ udevGetDMIData(virNodeDevCapSystemPtr syscap)
>
>                virObjectUnlock(priv);
>
> Pesky return statements ;-)
>

Wow, you really must have been a sharpshooter in the previous life ;), thanks a
lot.

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