From: Nick Piggin Date: Wed, 19 Nov 2008 23:36:32 +0000 (-0800) Subject: mm: vmalloc allocator off by one X-Git-Tag: 2.1b_release~15252 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f011c2dae6cffc50ef67d9bd937b488ba5db8913;p=platform%2Fkernel%2Fkernel-mfld-blackbay.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 ba6b0f5..46aab4d 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);