提交 f011c2da 编写于 作者: N Nick Piggin 提交者: Linus Torvalds

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: NNick Piggin <npiggin@suse.de>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 f481891f
...@@ -362,7 +362,7 @@ retry: ...@@ -362,7 +362,7 @@ retry:
goto found; 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); addr = ALIGN(first->va_end + PAGE_SIZE, align);
n = rb_next(&first->rb_node); n = rb_next(&first->rb_node);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册