diff options
author | Shaohua Li <shaohua.li@intel.com> | 2008-10-27 16:03:18 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-28 04:33:17 -0400 |
commit | 60817c9b31ef7897d60bca2f384cbc316a3fdd8b (patch) | |
tree | ee159c8287ca45338804a57ce2098e1aaf8e0cb0 /arch/x86 | |
parent | 3afa39493de510c33c56ddc76e6e1af7f87c5392 (diff) |
x86, memory hotplug: remove wrong -1 in calling init_memory_mapping()
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>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/mm/init_64.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index c7a4c5a9a21b..f79a02f64d10 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
@@ -837,7 +837,7 @@ int arch_add_memory(int nid, u64 start, u64 size) | |||
837 | unsigned long nr_pages = size >> PAGE_SHIFT; | 837 | unsigned long nr_pages = size >> PAGE_SHIFT; |
838 | int ret; | 838 | int ret; |
839 | 839 | ||
840 | last_mapped_pfn = init_memory_mapping(start, start + size-1); | 840 | last_mapped_pfn = init_memory_mapping(start, start + size); |
841 | if (last_mapped_pfn > max_pfn_mapped) | 841 | if (last_mapped_pfn > max_pfn_mapped) |
842 | max_pfn_mapped = last_mapped_pfn; | 842 | max_pfn_mapped = last_mapped_pfn; |
843 | 843 | ||