WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Fix /vm/uuid xenstore leak on tapdisk2 de

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix /vm/uuid xenstore leak on tapdisk2 device cleanup
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 23 Dec 2010 05:33:56 -0800
Delivery-date: Thu, 23 Dec 2010 05:49:29 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Chunyan Liu <cyliu@xxxxxxxxxx>
# Date 1292261967 0
# Node ID a5a0817d92104b61a5db5989c2a57aff430023bc
# Parent  a40455ae9ad3f1d0ff057fb61b833223c95fc762
Fix /vm/uuid xenstore leak on tapdisk2 device cleanup

While doing block-detach blktap2 disk, tap2 device info is not cleared from
xenstore /vm/uuid/xxx. The reason is in xen-hotplug-cleanup script: when $vm_dev
does not exist, $(xenstore-read "$vm_dev" 2>/dev/null) is also "", won't enter
the block. So, change to use cmd return value to check existence.

Signed-off-by Chunyan Liu <cyliu@xxxxxxxxxx>
Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
committer: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
 tools/hotplug/Linux/xen-hotplug-cleanup |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff -r a40455ae9ad3 -r a5a0817d9210 tools/hotplug/Linux/xen-hotplug-cleanup
--- a/tools/hotplug/Linux/xen-hotplug-cleanup   Mon Dec 13 17:15:31 2010 +0000
+++ b/tools/hotplug/Linux/xen-hotplug-cleanup   Mon Dec 13 17:39:27 2010 +0000
@@ -21,10 +21,12 @@ if [ "$vm" != "" ]; then
 
   # if the vm path does not exist and the device class is 'vbd' then we may 
have
   # a tap2 device
-  if [ "$(xenstore-read "$vm_dev" 2>/dev/null)" != "" ] \
-       && [ "${path_array[1]}" = "vbd" ]; then
-    vm_dev="$vm/device/tap2/${path_array[3]}"
-  fi
+  $(xenstore-read "$vm_dev" 2>/dev/null) || \
+  {
+     if [ "${path_array[1]}" = "vbd" ]; then
+        vm_dev="$vm/device/tap2/${path_array[3]}"
+     fi
+  }
 else
   vm_dev=
 fi

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Fix /vm/uuid xenstore leak on tapdisk2 device cleanup, Xen patchbot-unstable <=