From d1c7b00b60a4e4fa3d336a945e4710a10997ded0 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Mon, 11 Feb 2013 16:45:50 +0000 Subject: [PATCH] Release VM lock before acquiring virDomainObjListPtr lock When removing a VM from the virDomainObjListPtr, we must not be holding the VM lock while acquiring the list lock. Re-order code to ensure that we can release the VM lock early. --- src/conf/domain_conf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 1c925f0914..7a2b012fd9 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -2116,11 +2116,10 @@ void virDomainObjListRemove(virDomainObjListPtr doms, { char uuidstr[VIR_UUID_STRING_BUFLEN]; - virObjectLock(doms); virUUIDFormat(dom->def->uuid, uuidstr); - virObjectUnlock(dom); + virObjectLock(doms); virHashRemoveEntry(doms->objs, uuidstr); virObjectUnlock(doms); } -- 2.39.5