summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorShaohua Li <shaohua.li@intel.com>2008-10-27 13:03:18 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2008-12-13 15:29:31 -0800
commit05d7d06b6defd2778addbe70454667d00cfc37df (patch)
tree20796753ec4c2575bb83a5510c09be54f7a1a7d2 /arch
parent11ab6487b5c44b37faaa0d01ad362d5afa4f3570 (diff)
x86, memory hotplug: remove wrong -1 in calling init_memory_mapping()
commit 60817c9b31ef7897d60bca2f384cbc316a3fdd8b upstream. Impact: fix crash with memory hotplug Shuahua Li found: | I just did some experiments on a desktop for memory hotplug and this bug | triggered a crash in my test. | | Yinghai's suggestion also fixed the bug. We don't need to round it, just remove that extra -1 Signed-off-by: Yinghai <yinghai@kernel.org> Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/mm/init_64.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
index d3746efb060d..25a44c7b57e9 100644
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -721,7 +721,7 @@ int arch_add_memory(int nid, u64 start, u64 size)
unsigned long nr_pages = size >> PAGE_SHIFT;
int ret;
- last_mapped_pfn = init_memory_mapping(start, start + size-1);
+ last_mapped_pfn = init_memory_mapping(start, start + size);
if (last_mapped_pfn > max_pfn_mapped)
max_pfn_mapped = last_mapped_pfn;