提交 877a2224 编写于 作者: M Martin Kletzander

numa: fix assumption in virNumaNodeIsAvailable()

When compiled without full numa support, the stub function for
virNumaNodeIsAvailable() just checks whether specified node is in range
<0, max); where max is maximum NUMA node available on the host.  But
because the maximum node number is the highest usabe number (and not the
count of nodes), the check is incorrect as it should check whether the
specified node is in range <0, max> instead.
Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
上级 c63ef045
......@@ -460,7 +460,7 @@ virNumaNodeIsAvailable(int node)
return false;
/* Do we have anything better? */
return (node >= 0) && (node < max_node);
return (node >= 0) && (node <= max_node);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册