The patch titled Subject: mm/memory.c: make apply_to_page_range() more robust has been added to the -mm tree. Its filename is make-apply_to_page_range-more-robust.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/make-apply_to_page_range-more-robust.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/make-apply_to_page_range-more-robust.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: Mika Penttilä <mika.penttila@xxxxxxxxxxxx> Subject: mm/memory.c: make apply_to_page_range() more robust Arm and arm64 used to trigger this BUG_ON() - this has now been fixed. But a WARN_ON() here is sufficient to catch future buggy callers. Signed-off-by: Mika Penttilä <mika.penttila@xxxxxxxxxxxx> Reviewed-by: Pekka Enberg <penberg@xxxxxxxxxx> Acked-by: David Rientjes <rientjes@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/memory.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff -puN mm/memory.c~make-apply_to_page_range-more-robust mm/memory.c --- a/mm/memory.c~make-apply_to_page_range-more-robust +++ a/mm/memory.c @@ -1876,7 +1876,9 @@ int apply_to_page_range(struct mm_struct unsigned long end = addr + size; int err; - BUG_ON(addr >= end); + if (WARN_ON(addr >= end)) + return -EINVAL; + pgd = pgd_offset(mm, addr); do { next = pgd_addr_end(addr, end); _ Patches currently in -mm which might be from mika.penttila@xxxxxxxxxxxx are make-apply_to_page_range-more-robust.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