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.

thp: avoid VM_BUG_ON page_count(page) false positives in __collapse_huge_page_copy

Speculative cache pagecache lookups can elevate the refcount from
under us, so avoid the false positive. If the refcount is < 2 we'll be
notified by a VM_BUG_ON in put_page_testzero as there are two
put_page(src_page) in a row before returning from this function.

Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Reviewed-by: Rik van Riel <riel@redhat.com>
Reviewed-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Petr Holasek <pholasek@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Andrea Arcangeli and committed by
Linus Torvalds
99a1300e 63994137

-1
-1
mm/huge_memory.c
··· 1811 1811 src_page = pte_page(pteval); 1812 1812 copy_user_highpage(page, src_page, address, vma); 1813 1813 VM_BUG_ON(page_mapcount(src_page) != 1); 1814 - VM_BUG_ON(page_count(src_page) != 2); 1815 1814 release_pte_page(src_page); 1816 1815 /* 1817 1816 * ptl mostly unnecessary, but preempt has to