mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
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>
This commit is contained in:
parent
88e9f30402
commit
9cfcc296fe
@ -2274,7 +2274,7 @@ nodeStateInitialize(bool privileged,
|
||||
if (!(priv->mdevctlMonitors = monitorFileRecursively(priv,
|
||||
mdevctlConfigDir))) {
|
||||
virMutexUnlock(&priv->mdevctlLock);
|
||||
goto cleanup;
|
||||
goto unlock;
|
||||
}
|
||||
virMutexUnlock(&priv->mdevctlLock);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user