]> git.ipfire.org Git - thirdparty/libvirt.git/commit
nodedev: Unlock @priv if initialization of mdevctlMonitors fails
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 12 Apr 2021 14:18:24 +0000 (16:18 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 13 Apr 2021 07:31:51 +0000 (09:31 +0200)
commit9cfcc296fe641ee5d5c7e7802b1df40dd3749944
treed85f480a5d244b6740be0cd0474dcf839164ea26
parent88e9f304028b3893ec8544cb1ea6e8a44542265f
nodedev: Unlock @priv if initialization of mdevctlMonitors fails

If initialization of priv->mdevctlMonitors fails, then the
control jumps over to cleanup label where nodeStateCleanup() is
called which tries to lock @priv. But since @priv was already
locked before taking the jump a deadlock occurs. The solution is
to jump onto @unlock label, just like the code around is doing.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
src/node_device/node_device_udev.c