Signed-off-by: Dave Hansen --- memhotplug-dave/mm/memory_hotplug.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff -puN mm/sparse.c~D0.5-extreme mm/sparse.c diff -puN drivers/base/memory.c~D0.5-extreme drivers/base/memory.c diff -puN mm/memory_hotplug.c~D0.5-extreme mm/memory_hotplug.c --- memhotplug/mm/memory_hotplug.c~D0.5-extreme 2005-07-28 13:50:23.000000000 -0700 +++ memhotplug-dave/mm/memory_hotplug.c 2005-07-28 13:50:23.000000000 -0700 @@ -70,9 +70,11 @@ int __add_section(struct zone *zone, uns int ret; /* - * don't check this for failure because it is possible that the - * section already has a mem_map. The sparse code will fix this up + * This can potentially allocate memory, and does its own + * internal locking. */ + sparse_index_init(pfn_to_section_nr(phys_start_pfn), pgdat->node_id); + pgdat_resize_lock(pgdat, &flags); memmap = __kmalloc_section_memmap(nr_pages); ret = sparse_add_one_section(zone, phys_start_pfn, memmap); _