mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-23 13:05:27 +00:00
Don't update dom->persistent without lock held
virDomainObjListLoadAllConfigs sets dom->persistent after having released its lock on the domain object. This exposes a possible race condition. Signed-off-by: Daniel P. Berrange <berrange@redhat.com> (cherry picked from commit b260a77e34ed93f1b4f4f6436435cf5955e3f4b8)
This commit is contained in:
parent
643f5fcf3a
commit
9311f8c6f3
@ -17343,9 +17343,9 @@ virDomainObjListLoadAllConfigs(virDomainObjListPtr doms,
|
||||
notify,
|
||||
opaque);
|
||||
if (dom) {
|
||||
virObjectUnlock(dom);
|
||||
if (!liveStatus)
|
||||
dom->persistent = 1;
|
||||
virObjectUnlock(dom);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user