diff --git a/[refs] b/[refs] index 17e35c33be7c..eac35a059482 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2c43630fb0ff3f01c29367248ffa4a851e2c9b34 +refs/heads/master: 46a66eecdf7bc12562ecb492297447ed0e1ecf59 diff --git a/trunk/mm/sparse.c b/trunk/mm/sparse.c index 0a51f36ba3a1..d7c32de99ee8 100644 --- a/trunk/mm/sparse.c +++ b/trunk/mm/sparse.c @@ -32,7 +32,10 @@ static struct mem_section *sparse_index_alloc(int nid) unsigned long array_size = SECTIONS_PER_ROOT * sizeof(struct mem_section); - section = alloc_bootmem_node(NODE_DATA(nid), array_size); + if (system_state == SYSTEM_RUNNING) + section = kmalloc_node(array_size, GFP_KERNEL, nid); + else + section = alloc_bootmem_node(NODE_DATA(nid), array_size); if (section) memset(section, 0, array_size); @@ -281,9 +284,9 @@ int sparse_add_one_section(struct zone *zone, unsigned long start_pfn, ret = sparse_init_one_section(ms, section_nr, memmap); - if (ret <= 0) - __kfree_section_memmap(memmap, nr_pages); out: pgdat_resize_unlock(pgdat, &flags); + if (ret <= 0) + __kfree_section_memmap(memmap, nr_pages); return ret; }