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-3.1-testing] xm: Fix xm vcpu-pin to complain for CP

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-3.1-testing] xm: Fix xm vcpu-pin to complain for CPU numbers out of range.
From: "Xen patchbot-3.1-testing" <patchbot-3.1-testing@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 26 Feb 2008 14:10:32 -0800
Delivery-date: Tue, 26 Feb 2008 14:10:37 -0800
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.fraser@xxxxxxxxxx>
# Date 1203606902 0
# Node ID 4dc6caabd5faa4a7b4f7afcf7fe5c5c030d480f5
# Parent  c374d4d0945c5b335d380e707936ccc0958d3950
xm: Fix xm vcpu-pin to complain for CPU numbers out of range.
Signed-off-by: Masaki Kanno <kanno.masaki@xxxxxxxxxxxxxx>
xen-unstable changeset:   17092:511ab2b89ced1e190c6c76139b60049b69be69ef
xen-unstable date:        Wed Feb 20 17:42:12 2008 +0000
---
 tools/python/xen/lowlevel/xc/xc.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletion(-)

diff -r c374d4d0945c -r 4dc6caabd5fa tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Wed Feb 20 17:50:27 2008 +0000
+++ b/tools/python/xen/lowlevel/xc/xc.c Thu Feb 21 15:15:02 2008 +0000
@@ -226,7 +226,16 @@ static PyObject *pyxc_vcpu_setaffinity(X
     {
         cpumap = 0ULL;
         for ( i = 0; i < PyList_Size(cpulist); i++ ) 
-            cpumap |= (uint64_t)1 << PyInt_AsLong(PyList_GetItem(cpulist, i));
+        {
+            long cpu = PyInt_AsLong(PyList_GetItem(cpulist, i));
+            if ( cpu >= 64 )
+            {
+                errno = EINVAL;
+                PyErr_SetFromErrno(xc_error_obj);
+                return NULL;
+            }
+            cpumap |= (uint64_t)1 << cpu;
+        }
     }
   
     if ( xc_vcpu_setaffinity(self->xc_handle, dom, vcpu, cpumap) != 0 )

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-3.1-testing] xm: Fix xm vcpu-pin to complain for CPU numbers out of range., Xen patchbot-3.1-testing <=