mirror of
https://github.com/libvirt/libvirt.git
synced 2026-09-03 20:53:04 -05: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>
This commit is contained in:
@@ -17373,9 +17373,9 @@ virDomainObjListLoadAllConfigs(virDomainObjListPtr doms,
|
||||
notify,
|
||||
opaque);
|
||||
if (dom) {
|
||||
virObjectUnlock(dom);
|
||||
if (!liveStatus)
|
||||
dom->persistent = 1;
|
||||
virObjectUnlock(dom);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user