Skip to contentSkip to conversation

xend: fix leak of /local/domain/* in xenstore

PATCH New Kouya Shimura 1 participant 1 message Apr 7, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xend: fix leak of /local/domain/* in xenstore

My previous patch seems to be missing. so I resend.

xenwatch thread _storeChanged() may create /local/domain/<domid> entries in xenstore even after the domain has shutdown.

tools/python/xen/xend/XendDomainInfo.py +7 -1
diff -r 5a60eb7fad79 tools/python/xen/xend/XendDomainInfo.py
@@ -1634,7 +1634,13 @@ class XendDomainInfo:
         if changed:
             # Update the domain section of the store, as this contains some
             # parameters derived from the VM configuration.
-            self._storeDomDetails()
+            self.refresh_shutdown_lock.acquire()
+            try:
+                state = self._stateGet()
+                if state not in (DOM_STATE_SHUTDOWN, DOM_STATE_HALTED,):
+                    self._storeDomDetails()
+            finally:
+                self.refresh_shutdown_lock.release()
 
         return 1
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel