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 external-device-migrate infinite loop

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix external-device-migrate infinite loop.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 02 Oct 2007 17:40:10 -0700
Delivery-date: Tue, 02 Oct 2007 17:40:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1191315413 -3600
# Node ID 8426ac1a5df8acd1996733dbc2ecb1d3a8f418c8
# Parent  1ead02bab5c81b362032768a21b6ca08a6b0b2e3
Fix external-device-migrate infinite loop.

For some (yet) unknown reason extern-device-migrate is called
twice, once with a missing domname argument.

The following invocation loops forever:
 external-device-migrate -domname
because "shift 2" never shifts ($# < 2) and $# is always 1.

From: Pascal Bouchareine <pascal@xxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 tools/examples/external-device-migrate |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff -r 1ead02bab5c8 -r 8426ac1a5df8 tools/examples/external-device-migrate
--- a/tools/examples/external-device-migrate    Tue Oct 02 09:41:10 2007 +0100
+++ b/tools/examples/external-device-migrate    Tue Oct 02 09:56:53 2007 +0100
@@ -16,6 +16,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #
 
+set -x
 
 # This script is called by XenD for migration of external devices
 # It does not handle the migration of those devices itself, but
@@ -57,11 +58,11 @@ function evaluate_params()
        stype=""
        while [ $# -ge 1 ]; do
                case "$1" in
-               -step)          step=$2; shift 2;;
-               -host)          host=$2; shift 2;;
-               -domname)       domname=$2; shift 2;;
-               -type)          typ=$2; shift 2;;
-               -subtype)       stype=$2; shift 2;;
+               -step)          step=$2; shift; shift;;
+               -host)          host=$2; shift; shift;;
+               -domname)       domname=$2; shift; shift;;
+               -type)          typ=$2; shift; shift;;
+               -subtype)       stype=$2; shift; shift;;
                -recover)       recover=1; shift;;
                -help)          ext_dev_migrate_usage; exit 0;;
                *)              break;;

_______________________________________________
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 external-device-migrate infinite loop., Xen patchbot-unstable <=