[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen master] python: xc: fix max_cpu_index sign error
commit 3bc9c4f98a5dea5afda3ad2aae243e88d12a7e09 Author: Petre Eftime <epetre@xxxxxxxxxx> AuthorDate: Thu Apr 5 12:49:23 2018 +0000 Commit: Wei Liu <wei.liu2@xxxxxxxxxx> CommitDate: Fri Apr 6 09:05:28 2018 +0100 python: xc: fix max_cpu_index sign error When 0-indexing, maximum index is num_entries - 1. The python xc library had a sign error where the minus was replaced by a plus, making tools that depended on it to look for CPUs that did not exist. Signed-off-by: Petre Eftime <epetre@xxxxxxxxxx> Acked-by: Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx> Release-acked-by: Juergen Gross <jgross@xxxxxxxx> --- tools/python/xen/lowlevel/xc/xc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/python/xen/lowlevel/xc/xc.c b/tools/python/xen/lowlevel/xc/xc.c index f501764100..694bfa0642 100644 --- a/tools/python/xen/lowlevel/xc/xc.c +++ b/tools/python/xen/lowlevel/xc/xc.c @@ -1079,7 +1079,7 @@ static PyObject *pyxc_topologyinfo(XcObject *self) } } - ret_obj = Py_BuildValue("{s:i}", "max_cpu_index", num_cpus + 1); + ret_obj = Py_BuildValue("{s:i}", "max_cpu_index", num_cpus - 1); PyDict_SetItemString(ret_obj, "cpu_to_core", cpu_to_core_obj); Py_DECREF(cpu_to_core_obj); -- generated by git-patchbot for /home/xen/git/xen.git#master _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |