Fix deadlock when reloading configs

This commit is contained in:
Daniel P. Berrange 2008-12-15 11:00:11 +00:00
parent 289d52c49e
commit 43b897c17a
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Mon Dec 15 10:59:19 GMT 2008 Daniel P. Berrange <berrange@redhat.com>
* src/domain_conf.c: Unlock domain object after fetching
it to avoid deadlock when re-loading configs
Fri Dec 12 17:41:19 +0100 2008 Jim Meyering <meyering@redhat.com>
remove redundant optname arguments

View File

@ -3330,8 +3330,11 @@ virDomainObjPtr virDomainLoadConfig(virConnectPtr conn,
VIR_DOMAIN_XML_INACTIVE)))
goto error;
if (virDomainFindByName(doms, def->name))
if ((dom = virDomainFindByName(doms, def->name))) {
virDomainObjUnlock(dom);
dom = NULL;
newVM = 0;
}
if (!(dom = virDomainAssignDef(conn, doms, def)))
goto error;