From mboxrd@z Thu Jan 1 00:00:00 1970 Message-Id: <20081108022013.561474000@nick.local0.net> References: <20081108021512.686515000@suse.de> Date: Sat, 08 Nov 2008 13:15:13 +1100 From: npiggin@suse.de Subject: [patch 1/9] mm: vmalloc allocator off by one Content-Disposition: inline; filename=mm-vmalloc-gap-fix.patch Sender: owner-linux-mm@kvack.org Return-Path: To: akpm@linux-foundation.org, torvalds@linux-foundation.org Cc: linux-mm@kvack.org, glommer@redhat.com, rjw@sisk.pl List-ID: Fix off by one bug in the KVA allocator that can leave gaps in the address space. Signed-off-by: Nick Piggin --- Index: linux-2.6/mm/vmalloc.c =================================================================== --- linux-2.6.orig/mm/vmalloc.c +++ linux-2.6/mm/vmalloc.c @@ -362,7 +363,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); -- -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org