On 10/19/2017 02:54 AM, Erik Skultety wrote: > 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 > Sadly they seem to work better when reviewing code... They often fail me on my own code ;-) John -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list