Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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.

Reported-by: Dave Jones <davej@codemonkey.org.uk>
Suggested-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Hugh Dickins and committed by
Linus Torvalds
46435364 34229b27

+1 -8
+1 -3
mm/gup.c
··· 430 430 * Anon pages in shared mappings are surprising: now 431 431 * just reject it. 432 432 */ 433 - if (!is_cow_mapping(vm_flags)) { 434 - WARN_ON_ONCE(vm_flags & VM_MAYWRITE); 433 + if (!is_cow_mapping(vm_flags)) 435 434 return -EFAULT; 436 - } 437 435 } 438 436 } else if (!(vm_flags & VM_READ)) { 439 437 if (!(gup_flags & FOLL_FORCE))
-5
mm/memory.c
··· 2237 2237 2238 2238 page_cache_get(old_page); 2239 2239 2240 - /* 2241 - * Only catch write-faults on shared writable pages, 2242 - * read-only shared pages can get COWed by 2243 - * get_user_pages(.write=1, .force=1). 2244 - */ 2245 2240 if (vma->vm_ops && vma->vm_ops->page_mkwrite) { 2246 2241 int tmp; 2247 2242