diff options
author | Tejun Heo <tj@kernel.org> | 2012-01-13 10:14:12 -0800 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2012-01-16 08:38:06 +0100 |
commit | 5d53cb27d849c899136c048ec84c940ac449494b (patch) | |
tree | 66c78c014a06641245fa3cd219afabdc7afdf427 /mm/nommu.c | |
parent | edf7c8148ec40c0fd27c0ef3f688defcc65e3913 (diff) |
memblock: Fix alloc failure due to dumb underflow protection in memblock_find_in_range_node()
7bd0b0f0da ("memblock: Reimplement memblock allocation using
reverse free area iterator") implemented a simple top-down
allocator using a reverse memblock iterator. To avoid underflow
in the allocator loop, it simply raised the lower boundary to
the requested size under the assumption that requested size
would be far smaller than available memblocks.
This causes early page table allocation failure under certain
configurations in Xen. Fix it by checking for underflow directly
instead of bumping up lower bound.
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: rjw@sisk.pl
Cc: xen-devel@lists.xensource.com
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/20120113181412.GA11112@google.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'mm/nommu.c')
0 files changed, 0 insertions, 0 deletions