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] tools/hotplug/Linux: force release lock i

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] tools/hotplug/Linux: force release lock if holder process is gone (fix)
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 23 Dec 2010 05:34:51 -0800
Delivery-date: Thu, 23 Dec 2010 05:44:54 -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 Kouya Shimura <kouya@xxxxxxxxxxxxxx>
# Date 1292431746 0
# Node ID c3c1fd0a940c434aa6b69463b090f365c42d463b
# Parent  764e95f64b28b381abcc40ddad5e77d47572f4d6
tools/hotplug/Linux: force release lock if holder process is gone (fix)

22508:57907b28e51a was unsafe for mutual exclusion.  There is a case
that the owner file doesn't exist yet when an atomic mkdir operation
fails.

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---
 tools/hotplug/Linux/locking.sh |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 764e95f64b28 -r c3c1fd0a940c tools/hotplug/Linux/locking.sh
--- a/tools/hotplug/Linux/locking.sh    Wed Dec 15 14:16:03 2010 +0000
+++ b/tools/hotplug/Linux/locking.sh    Wed Dec 15 16:49:06 2010 +0000
@@ -63,7 +63,7 @@ _claim_lock()
       retries=0
     else
       local pid=$(echo $owner | cut -d : -f 1)
-      if [ ! -f "/proc/$pid/status" ]
+      if [ -n "$pid" -a "$pid" != "unknown" -a ! -f "/proc/$pid/status" ]
       then
         _release_lock $lockdir
       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] tools/hotplug/Linux: force release lock if holder process is gone (fix), Xen patchbot-unstable <=