diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index b81a367b9f39bb056cc4127a674e8a3dd4d2567d..9597eec8239d3f2e3fc2052179ed588643be53e0 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -1801,7 +1801,7 @@ int __ref remove_memory(int nid, u64 start, u64 size) int retry = 1; start_pfn = PFN_DOWN(start); - end_pfn = start_pfn + PFN_DOWN(size); + end_pfn = PFN_UP(start + size - 1); /* * When CONFIG_MEMCG is on, one memory block may be used by other