--- a/mm/memory_hotplug.c~mm-hotplug-reorder-memblock_-calls-in-try_remove_memory +++ a/mm/memory_hotplug.c @@ -1750,13 +1750,13 @@ static int __ref try_remove_memory(int n /* remove memmap entry */ firmware_map_remove(start, start + size, "System RAM"); - memblock_free(start, size); - memblock_remove(start, size); /* remove memory block devices before removing memory */ remove_memory_block_devices(start, size); arch_remove_memory(nid, start, size, NULL); + memblock_free(start, size); + memblock_remove(start, size); __release_memory_resource(start, size); try_offline_node(nid);