The patch titled Subject: mm: retire GUP WARN_ON_ONCE that outlived its usefulness has been added to the -mm tree. Its filename is mm-retire-gup-warn_on_once-that-outlived-its-usefulness.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/mm-retire-gup-warn_on_once-that-outlived-its-usefulness.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/mm-retire-gup-warn_on_once-that-outlived-its-usefulness.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: Hugh Dickins <hughd@xxxxxxxxxx> Subject: mm: retire GUP WARN_ON_ONCE that outlived its usefulness Trinity is now hitting the WARN_ON_ONCE we added in v3.15 commit cda540ace6a1 ("mm: get_user_pages(write,force) refuse to COW in shared areas"). The warning has served its purpose, nobody was harmed by that change, so just remove the warning to generate less noise from Trinity. Which reminds me of the comment I wrongly left behind with that commit (but was spotted at the time by Kirill), which has since moved into a separate function, and become even more obscure: delete it. Signed-off-by: Hugh Dickins <hughd@xxxxxxxxxx> Reported-by: Dave Jones <davej@xxxxxxxxxxxxxxxxx> Suggested-by: Kirill A. Shutemov <kirill@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/gup.c | 4 +--- mm/memory.c | 5 ----- 2 files changed, 1 insertion(+), 8 deletions(-) diff -puN mm/gup.c~mm-retire-gup-warn_on_once-that-outlived-its-usefulness mm/gup.c --- a/mm/gup.c~mm-retire-gup-warn_on_once-that-outlived-its-usefulness +++ a/mm/gup.c @@ -430,10 +430,8 @@ static int check_vma_flags(struct vm_are * Anon pages in shared mappings are surprising: now * just reject it. */ - if (!is_cow_mapping(vm_flags)) { - WARN_ON_ONCE(vm_flags & VM_MAYWRITE); + if (!is_cow_mapping(vm_flags)) return -EFAULT; - } } } else if (!(vm_flags & VM_READ)) { if (!(gup_flags & FOLL_FORCE)) diff -puN mm/memory.c~mm-retire-gup-warn_on_once-that-outlived-its-usefulness mm/memory.c --- a/mm/memory.c~mm-retire-gup-warn_on_once-that-outlived-its-usefulness +++ a/mm/memory.c @@ -2237,11 +2237,6 @@ static int wp_page_shared(struct mm_stru page_cache_get(old_page); - /* - * Only catch write-faults on shared writable pages, - * read-only shared pages can get COWed by - * get_user_pages(.write=1, .force=1). - */ if (vma->vm_ops && vma->vm_ops->page_mkwrite) { int tmp; _ Patches currently in -mm which might be from hughd@xxxxxxxxxx are mm-retire-gup-warn_on_once-that-outlived-its-usefulness.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