Subject: + memblock-add-limit-checking-to-memblock_virt_alloc.patch added to -mm tree To: yinghai@xxxxxxxxxx,dave.hansen@xxxxxxxxx,grygorii.strashko@xxxxxx,hpa@xxxxxxxxx,khilman@xxxxxxxxxx,konrad.wilk@xxxxxxxxxx,mingo@xxxxxxx,olof@xxxxxxxxx,santosh.shilimkar@xxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Tue, 28 Jan 2014 14:08:49 -0800 The patch titled Subject: memblock: Add limit checking to memblock_virt_alloc has been added to the -mm tree. Its filename is memblock-add-limit-checking-to-memblock_virt_alloc.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/memblock-add-limit-checking-to-memblock_virt_alloc.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/memblock-add-limit-checking-to-memblock_virt_alloc.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Yinghai Lu <yinghai@xxxxxxxxxx> Subject: memblock: Add limit checking to memblock_virt_alloc 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@xxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxx> Cc: "H. Peter Anvin" <hpa@xxxxxxxxx> Reported-by: Kevin Hilman <khilman@xxxxxxxxxx> Reported-by: Olof Johansson <olof@xxxxxxxxx> Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> Cc: Dave Hansen <dave.hansen@xxxxxxxxx> Cc: Santosh Shilimkar <santosh.shilimkar@xxxxxx> Cc: "Strashko, Grygorii" <grygorii.strashko@xxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/memblock.c | 3 +++ 1 file changed, 3 insertions(+) diff -puN mm/memblock.c~memblock-add-limit-checking-to-memblock_virt_alloc mm/memblock.c --- a/mm/memblock.c~memblock-add-limit-checking-to-memblock_virt_alloc +++ a/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); _ Patches currently in -mm which might be from yinghai@xxxxxxxxxx are origin.patch memblock-add-limit-checking-to-memblock_virt_alloc.patch linux-next.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html