From: Nick Piggin Date: Wed, 19 Nov 2008 23:36:32 +0000 (-0800) Subject: mm: vmalloc allocator off by one X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f011c2dae6cffc50ef67d9bd937b488ba5db8913;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.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);