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] xend: Fix numainfo/topologyinfo loop iter

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xend: Fix numainfo/topologyinfo loop iterators in Xc extension.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 16 Apr 2010 21:50:24 -0700
Delivery-date: Sun, 18 Apr 2010 11:03:31 -0700
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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1271330988 -3600
# Node ID 22339e54f0bb0ebceee90e9b39c896ff004c6a02
# Parent  b90f92d0f06b18b5a820c56d82901f9d421375bd
xend: Fix numainfo/topologyinfo loop iterators in Xc extension.

Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
Signed-off-by: Dexuan Cui <dexuan.cui@xxxxxxxxx>
---
 tools/python/xen/lowlevel/xc/xc.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -r b90f92d0f06b -r 22339e54f0bb tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Thu Apr 15 12:28:33 2010 +0100
+++ b/tools/python/xen/lowlevel/xc/xc.c Thu Apr 15 12:29:48 2010 +0100
@@ -1215,7 +1215,7 @@ static PyObject *pyxc_topologyinfo(XcObj
     cpu_to_core_obj = PyList_New(0);
     cpu_to_socket_obj = PyList_New(0);
     cpu_to_node_obj = PyList_New(0);
-    for ( i = 0; i < max_cpu_index; i++ )
+    for ( i = 0; i <= max_cpu_index; i++ )
     {
         if ( coremap[i] == INVALID_TOPOLOGY_ID )
         {
@@ -1296,7 +1296,7 @@ static PyObject *pyxc_numainfo(XcObject 
     node_to_memfree_obj = PyList_New(0);
     node_to_dma32_mem_obj = PyList_New(0);
     node_to_node_dist_list_obj = PyList_New(0);
-    for ( i = 0; i < max_node_index; i++ )
+    for ( i = 0; i <= max_node_index; i++ )
     {
         PyObject *pyint;
 
@@ -1318,7 +1318,7 @@ static PyObject *pyxc_numainfo(XcObject 
 
         /* Node to Node Distance */
         node_to_node_dist_obj = PyList_New(0);
-        for ( j = 0; j < ninfo.max_node_index; j++ )
+        for ( j = 0; j <= max_node_index; j++ )
         {
             uint32_t dist = nodes_dist[i*(max_node_index+1) + j];
             if ( dist == INVALID_TOPOLOGY_ID )

_______________________________________________
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] xend: Fix numainfo/topologyinfo loop iterators in Xc extension., Xen patchbot-unstable <=