From: Linus Torvalds Date: Wed, 9 Jan 2013 16:36:54 +0000 (-0800) Subject: mm: reinstante dropped pmd_trans_splitting() check X-Git-Tag: MMI-PSA29.97-13-9~15211 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e53289c0c5e5a24e29e571eba7af05c845c10890;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git mm: reinstante dropped pmd_trans_splitting() check The check for a pmd being in the process of being split was dropped by mistake by commit d10e63f29488 ("mm: numa: Create basic numa page hinting infrastructure"). Put it back. Reported-by: Dave Jones Debugged-by: Hillf Danton Acked-by: Andrea Arcangeli Acked-by: Mel Gorman Cc: Kirill Shutemov Signed-off-by: Linus Torvalds --- diff --git a/mm/memory.c b/mm/memory.c index 49fb1cf08611..bb1369f7b9b4 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -3711,6 +3711,14 @@ retry: if (pmd_trans_huge(orig_pmd)) { unsigned int dirty = flags & FAULT_FLAG_WRITE; + /* + * If the pmd is splitting, return and retry the + * the fault. Alternative: wait until the split + * is done, and goto retry. + */ + if (pmd_trans_splitting(orig_pmd)) + return 0; + if (pmd_numa(orig_pmd)) return do_huge_pmd_numa_page(mm, vma, address, orig_pmd, pmd);