Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

thp: avoid VM_BUG_ON page_count(page) false positives in __collapse_h…


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 <>
Reviewed-by: Rik van Riel <>
Reviewed-by: Johannes Weiner <>
Cc: Hugh Dickins <>
Cc: Mel Gorman <>
Cc: Petr Holasek <>
Cc: Andrew Morton <>
Signed-off-by: Linus Torvalds <>
  • Loading branch information...
commit 99a1300e1d84709f419182bb5189760e78234882 1 parent 6399413
Andrea Arcangeli authored torvalds committed
Showing with 0 additions and 1 deletion.
  1. +0 −1  mm/huge_memory.c
1  mm/huge_memory.c
@@ -1811,7 +1811,6 @@ static void __collapse_huge_page_copy(pte_t *pte, struct page *page,
src_page = pte_page(pteval);
copy_user_highpage(page, src_page, address, vma);
VM_BUG_ON(page_mapcount(src_page) != 1);
- VM_BUG_ON(page_count(src_page) != 2);
* ptl mostly unnecessary, but preempt has to
Please sign in to comment.
Something went wrong with that request. Please try again.