mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06: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:
parent
d70840f68d
commit
b260a77e34
@ -17373,9 +17373,9 @@ virDomainObjListLoadAllConfigs(virDomainObjListPtr doms,
|
|||||||
notify,
|
notify,
|
||||||
opaque);
|
opaque);
|
||||||
if (dom) {
|
if (dom) {
|
||||||
virObjectUnlock(dom);
|
|
||||||
if (!liveStatus)
|
if (!liveStatus)
|
||||||
dom->persistent = 1;
|
dom->persistent = 1;
|
||||||
|
virObjectUnlock(dom);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user