[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] xend: fix leak of /local/domain/* in xenstore



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1239095675 -3600
# Node ID 71077a0fd2893c3e0ab41b4892c41143fd7df79c
# Parent  accf139b2eb91ddfc584a26db926bc3e952016f6
xend: fix leak of /local/domain/* in xenstore

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

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
---
 tools/python/xen/xend/XendDomainInfo.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletion(-)

diff -r accf139b2eb9 -r 71077a0fd289 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py   Mon Apr 06 21:12:33 2009 +0100
+++ b/tools/python/xen/xend/XendDomainInfo.py   Tue Apr 07 10:14:35 2009 +0100
@@ -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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.