The patch titled Subject: mm: numa: add paranoid check around pte_protnone_numa has been removed from the -mm tree. Its filename was mm-numa-add-paranoid-check-around-pte_protnone_numa.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Mel Gorman <mgorman@xxxxxxx> Subject: mm: numa: add paranoid check around pte_protnone_numa pte_protnone_numa is only safe to use after VMA checks for PROT_NONE are complete. Treating a real PROT_NONE PTE as a NUMA hinting fault is going to result in strangeness so add a check for it. BUG_ON looks like overkill but if this is hit then it's a serious bug that could result in corruption so do not even try recovering. It would have been more comprehensive to check VMA flags in pte_protnone_numa but it would have made the API ugly just for a debugging check. Signed-off-by: Mel Gorman <mgorman@xxxxxxx> Cc: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxxxxxxx> Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> Cc: Dave Jones <davej@xxxxxxxxxx> Cc: Hugh Dickins <hughd@xxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxxxxx> Cc: Kirill Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx> Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Cc: Paul Mackerras <paulus@xxxxxxxxx> Cc: Rik van Riel <riel@xxxxxxxxxx> Cc: Sasha Levin <sasha.levin@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/huge_memory.c | 3 +++ mm/memory.c | 3 +++ 2 files changed, 6 insertions(+) diff -puN mm/huge_memory.c~mm-numa-add-paranoid-check-around-pte_protnone_numa mm/huge_memory.c --- a/mm/huge_memory.c~mm-numa-add-paranoid-check-around-pte_protnone_numa +++ a/mm/huge_memory.c @@ -1262,6 +1262,9 @@ int do_huge_pmd_numa_page(struct mm_stru bool migrated = false; int flags = 0; + /* A PROT_NONE fault should not end up here */ + BUG_ON(!(vma->vm_flags & (VM_READ | VM_EXEC | VM_WRITE))); + ptl = pmd_lock(mm, pmdp); if (unlikely(!pmd_same(pmd, *pmdp))) goto out_unlock; diff -puN mm/memory.c~mm-numa-add-paranoid-check-around-pte_protnone_numa mm/memory.c --- a/mm/memory.c~mm-numa-add-paranoid-check-around-pte_protnone_numa +++ a/mm/memory.c @@ -3013,6 +3013,9 @@ static int do_numa_page(struct mm_struct bool migrated = false; int flags = 0; + /* A PROT_NONE fault should not end up here */ + BUG_ON(!(vma->vm_flags & (VM_READ | VM_EXEC | VM_WRITE))); + /* * The "pte" at this point cannot be used safely without * validation through pte_unmap_same(). It's of NUMA type but _ Patches currently in -mm which might be from mgorman@xxxxxxx are origin.patch mm-vmscan-fix-the-page-state-calculation-in-too_many_isolated.patch do_shared_fault-check-that-mmap_sem-is-held.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html