mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 07:05:28 +00:00
udevRemoveOneDevice: Unlock node device obj upon return
When removing a node device object from the internal list the udevRemoveOneDevice() function does plain unref over the object. This is not sufficient. If there is another thread that's waiting for the object lock it will wait forever. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
c740ae69c3
commit
4c1033a151
@ -1244,7 +1244,7 @@ udevRemoveOneDevice(struct udev_device *device)
|
||||
VIR_DEBUG("Removing device '%s' with sysfs path '%s'",
|
||||
def->name, name);
|
||||
virNodeDeviceObjListRemove(driver->devs, obj);
|
||||
virObjectUnref(obj);
|
||||
virNodeDeviceObjEndAPI(&obj);
|
||||
|
||||
virObjectEventStateQueue(driver->nodeDeviceEventState, event);
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user