提交 51387306 编写于 作者: D Dan Carpenter 提交者: James Hogan

metag: off by one in setup_bootmem_node()

If "nid == MAX_NUMNODES" then we write beyond the end of the node_data[]
array.
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
上级 95281171
......@@ -34,7 +34,7 @@ void __init setup_bootmem_node(int nid, unsigned long start, unsigned long end)
unsigned long pgdat_paddr;
/* Don't allow bogus node assignment */
BUG_ON(nid > MAX_NUMNODES || nid <= 0);
BUG_ON(nid >= MAX_NUMNODES || nid <= 0);
start_pfn = start >> PAGE_SHIFT;
end_pfn = end >> PAGE_SHIFT;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部