浏览代码

page_cgroup should ignore empty nodes

Fix a total bootup freeze on ia64.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Tested-by: Li Zefan <lizf@cn.fujitsu.com>
Reported-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
KAMEZAWA Hiroyuki 16 年之前
父节点
当前提交
653d22c0f5
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      mm/page_cgroup.c

+ 3 - 0
mm/page_cgroup.c

@@ -49,6 +49,9 @@ static int __init alloc_node_page_cgroup(int nid)
 	start_pfn = NODE_DATA(nid)->node_start_pfn;
 	start_pfn = NODE_DATA(nid)->node_start_pfn;
 	nr_pages = NODE_DATA(nid)->node_spanned_pages;
 	nr_pages = NODE_DATA(nid)->node_spanned_pages;
 
 
+	if (!nr_pages)
+		return 0;
+
 	table_size = sizeof(struct page_cgroup) * nr_pages;
 	table_size = sizeof(struct page_cgroup) * nr_pages;
 
 
 	base = __alloc_bootmem_node_nopanic(NODE_DATA(nid),
 	base = __alloc_bootmem_node_nopanic(NODE_DATA(nid),