Messages in this thread | | | Date | Tue, 28 Jan 2014 17:25:19 -0800 | Subject | Re: [PATCH] memblock: Add limit checking to memblock_virt_alloc | From | Kevin Hilman <> |
| |
On Tue, Jan 28, 2014 at 2:04 PM, Yinghai Lu <yinghai@kernel.org> wrote: > In original bootmem wrapper for memblock, we have limit checking. > > Add it to memblock_virt_alloc, to address arm and x86 booting crash. > > Signed-off-by: Yinghai Lu <yinghai@kernel.org> > > --- > mm/memblock.c | 3 +++ > 1 file changed, 3 insertions(+) > > Index: linux-2.6/mm/memblock.c > =================================================================== > --- linux-2.6.orig/mm/memblock.c > +++ linux-2.6/mm/memblock.c > @@ -1077,6 +1077,9 @@ static void * __init memblock_virt_alloc > if (!align) > align = SMP_CACHE_BYTES; > > + if (max_addr > memblock.current_limit) > + max_addr = memblock.current_limit; > + > again: > alloc = memblock_find_in_range_node(size, align, min_addr, max_addr, > nid);
Tested-by: Kevin Hilman <khilman@linaro.org>
Verified various ARM boots to be passing again.
Kevin
| |