Skip to content
Snippets Groups Projects
Commit f011c2da authored by Nick Piggin's avatar Nick Piggin Committed by Linus Torvalds
Browse files

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: default avatarNick Piggin <npiggin@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f481891f
No related merge requests found
......@@ -362,7 +362,7 @@ static struct vmap_area *alloc_vmap_area(unsigned long size,
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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment