]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fix deadlock when reloading configs
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 15 Dec 2008 11:00:11 +0000 (11:00 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Mon, 15 Dec 2008 11:00:11 +0000 (11:00 +0000)
ChangeLog
src/domain_conf.c

index 5a5f2c10d786e09c77182c67e276855387c94507..7371c8d70270151ff468dfef87a75fa43ed228f6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 485ffb2436425344d4a989ab86622d3d624b34f4..75f32e5b11a2e591ccc389f3551f69069e78ec05 100644 (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;