[libvirt] [PATCH] nodedev: Fix double unlock of the driver on udevEnumerateDevices failure
John Ferlan
jferlan at redhat.com
Wed Jul 26 12:36:04 UTC 2017
On 07/26/2017 04:45 AM, Erik Skultety wrote:
> Commit @4cb719b2dc moved the driver locks around since these have become
> unnecessary at spots where the code handles now self-lockable object
> list, but missed the possible double unlock if udevEnumerateDevices
> fails, because at that point the driver lock had been already dropped.
>
> Signed-off-by: Erik Skultety <eskultet at redhat.com>
> ---
> src/node_device/node_device_udev.c | 17 ++++++++++-------
> 1 file changed, 10 insertions(+), 7 deletions(-)
>
Oh yeah - missed that case... thanks.
w/r/t: _hal from Martin's review - that's pre-existing and separable.
Still in both cases you're in Initialization functions with an unlock of
an unlocked resource with no error checking by the same thread on your
way to a function that's about to destroy the mutex... and eventual
libvirtd death.
Tks -
John
More information about the libvir-list
mailing list