]> Git Repo - linux.git/commit - mm/huge_memory.c
mm: thp: fix DEBUG_PAGEALLOC oops in copy_page_rep()
authorHugh Dickins <[email protected]>
Mon, 23 Jun 2014 20:22:05 +0000 (13:22 -0700)
committerLinus Torvalds <[email protected]>
Mon, 23 Jun 2014 23:47:44 +0000 (16:47 -0700)
commit5338a9372234f8b782c7d78f0355e1cb21d02468
tree038ed1c19e7434f0ec4c6556b7367798348882ec
parented235875e2ca983197831337a986f0517074e1a0
mm: thp: fix DEBUG_PAGEALLOC oops in copy_page_rep()

Trinity has for over a year been reporting a CONFIG_DEBUG_PAGEALLOC oops
in copy_page_rep() called from copy_user_huge_page() called from
do_huge_pmd_wp_page().

I believe this is a DEBUG_PAGEALLOC false positive, due to the source
page being split, and a tail page freed, while copy is in progress; and
not a problem without DEBUG_PAGEALLOC, since the pmd_same() check will
prevent a miscopy from being made visible.

Fix by adding get_user_huge_page() and put_user_huge_page(): reducing to
the usual get_page() and put_page() on head page in the usual config;
but get and put references to all of the tail pages when
DEBUG_PAGEALLOC.

[[email protected]: coding-style fixes]
Signed-off-by: Hugh Dickins <[email protected]>
Acked-by: Kirill A. Shutemov <[email protected]>
Reported-by: Sasha Levin <[email protected]>
Tested-by: Sasha Levin <[email protected]>
Cc: Dave Jones <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: David Rientjes <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/huge_memory.c
This page took 0.053394 seconds and 4 git commands to generate.