Re: [PATCH] memblock: Add limit checking to memblock_virt_alloc
From: Andrew Morton
Date: Tue Jan 28 2014 - 17:08:50 EST
On Tue, 28 Jan 2014 14:04:25 -0800 Yinghai Lu <yinghai@xxxxxxxxxx> wrote:
> In original bootmem wrapper for memblock, we have limit checking.
>
> Add it to memblock_virt_alloc, to address arm and x86 booting crash.
>
> ...
>
> --- 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);
Thanks.
Kevin, Olof and Konrad (at least) have been hitting this. It would be
great to get some tested-by's, please?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/