Skip to content

Commit

Permalink
mm: vmalloc allocator off by one
Browse files Browse the repository at this point in the history
Fix off by one bug in the KVA allocator that can leave gaps in the address
space.

Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Nick Piggin authored and Linus Torvalds committed Nov 20, 2008
1 parent f481891 commit f011c2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mm/vmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f011c2d

Please sign in to comment.