thp: avoid VM_BUG_ON page_count(page) false positives in __collapse_huge_page_copy
Subsystems (2)
PATCH 1/1 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.
--- mm/huge_memory.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-)
mm/huge_memory.c +0 -1
@@ -1814,7 +1814,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 );release_pte_page (src_page);/* * ptl mostly unnecessary, but preempt has to
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 6 lines · Andrea Arcangeli
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_ONinput_page_testzeroas there are twoput_page(src_page)in a row before returning from this function.Signed-off-by Andrea Arcangeli <[email protected]>
Signature · 7 lines
All rights reversed -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 6 lines · Andrea Arcangeli
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_ONinput_page_testzeroas there are twoput_page(src_page)in a row before returning from this function.Signed-off-by Andrea Arcangeli <[email protected]>
Much better, thank you.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>