aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorNick Piggin <npiggin@suse.de>2008-11-19 18:36:32 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2008-11-19 21:49:58 -0500
commitf011c2dae6cffc50ef67d9bd937b488ba5db8913 (patch)
treed956e003a564b3881810eebe0d17fad6b74bb97c /mm
parentf481891fdc49d3d1b8a9674a1825d183069a805f (diff)
mm: vmalloc allocator off by one
Fix off by one bug in the KVA allocator that can leave gaps in the address space. Signed-off-by: Nick Piggin <npiggin@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/vmalloc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index ba6b0f5f7fac..46aab4dbf618 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -362,7 +362,7 @@ retry:
362 goto found; 362 goto found;
363 } 363 }
364 364
365 while (addr + size >= first->va_start && addr + size <= vend) { 365 while (addr + size > first->va_start && addr + size <= vend) {
366 addr = ALIGN(first->va_end + PAGE_SIZE, align); 366 addr = ALIGN(first->va_end + PAGE_SIZE, align);
367 367
368 n = rb_next(&first->rb_node); 368 n = rb_next(&first->rb_node);