* [PATCH] correct indexing in xc_cpu_to_node_t map
@ 2007-08-17 20:04 beth kon
0 siblings, 0 replies; only message in thread
From: beth kon @ 2007-08-17 20:04 UTC (permalink / raw)
To: xen-devel
Looks like there is a nit with initilizing the map array. It needs one
more element than MAX_CPU_ID since indexing starts at 0.
Signed-off-by: Beth Kon <eak@us.ibm.com>
diff -r 256160ff19b7 tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Thu Aug 16 13:27:59 2007 +0100
+++ b/tools/python/xen/lowlevel/xc/xc.c Fri Aug 17 15:44:22 2007 -0400
@@ -685,7 +685,7 @@ static PyObject *pyxc_physinfo(XcObject
char cpu_cap[128], *p=cpu_cap, *q=cpu_cap;
int i, j, max_cpu_id;
PyObject *ret_obj, *node_to_cpu_obj;
- xc_cpu_to_node_t map[MAX_CPU_ID];
+ xc_cpu_to_node_t map[MAX_CPU_ID + 1];
set_xen_guest_handle(info.cpu_to_node, map);
info.max_cpu_id = MAX_CPU_ID;
--
Elizabeth Kon (Beth)
IBM Linux Technology Center
Open Hypervisor Team
email: eak@us.ibm.com
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-08-17 20:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-17 20:04 [PATCH] correct indexing in xc_cpu_to_node_t map beth kon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.