From: Nick Piggin Date: Wed, 19 Nov 2008 23:36:32 +0000 (-0800) Subject: mm: vmalloc allocator off by one X-Git-Tag: v2.6.28-rc6~32 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=f011c2dae6cffc50ef67d9bd937b488ba5db8913;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/vmalloc.c b/mm/vmalloc.c index ba6b0f5f7fa..46aab4dbf61 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -362,7 +362,7 @@ retry: goto found; } - while (addr + size >= first->va_start && addr + size <= vend) { + while (addr + size > first->va_start && addr + size <= vend) { addr = ALIGN(first->va_end + PAGE_SIZE, align); n = rb_next(&first->rb_node);