summaryrefslogtreecommitdiff
path: root/arch/x86/mm/numa_32.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2011-04-05 02:23:47 +0400
committerH. Peter Anvin <hpa@zytor.com>2011-04-07 04:56:46 +0400
commit3fe14ab541cd9b0d1f243afb7556046f12c8743c (patch)
tree6dd136ad38d6ab7632f59171cdaa314a5da08be7 /arch/x86/mm/numa_32.c
parent6221f222c0ebf1acdf7abcf927178f40e1a65e2a (diff)
downloadlinux-3fe14ab541cd9b0d1f243afb7556046f12c8743c.tar.xz
x86-32, numa: Fix failure condition check in alloc_remap()
node_remap_{start|end}_vaddr[] describe [start, end) ranges; however, alloc_remap() incorrectly failed when the current allocation + size equaled the end but it should fail only when it goes over. Fix it. Signed-off-by: Tejun Heo <tj@kernel.org> Link: http://lkml.kernel.org/r/1301955840-7246-2-git-send-email-tj@kernel.org Acked-by: Yinghai Lu <yinghai@kernel.org> Cc: David Rientjes <rientjes@google.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'arch/x86/mm/numa_32.c')
-rw-r--r--arch/x86/mm/numa_32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/mm/numa_32.c b/arch/x86/mm/numa_32.c
index bde3906420df..84aac47c3887 100644
--- a/arch/x86/mm/numa_32.c
+++ b/arch/x86/mm/numa_32.c
@@ -200,7 +200,7 @@ void *alloc_remap(int nid, unsigned long size)
size = ALIGN(size, L1_CACHE_BYTES);
- if (!allocation || (allocation + size) >= node_remap_end_vaddr[nid])
+ if (!allocation || (allocation + size) > node_remap_end_vaddr[nid])
return NULL;
node_remap_alloc_vaddr[nid] += size;