1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-03-20 07:59:00 +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>
This commit is contained in:
Daniel P. Berrange 2013-10-28 14:07:26 +00:00
parent d70840f68d
commit b260a77e34

View File

@ -17373,9 +17373,9 @@ virDomainObjListLoadAllConfigs(virDomainObjListPtr doms,
notify,
opaque);
if (dom) {
virObjectUnlock(dom);
if (!liveStatus)
dom->persistent = 1;
virObjectUnlock(dom);
}
}