The patch titled Subject: mm/hugetlb: add migration entry check in hugetlb_change_protection has been removed from the -mm tree. Its filename was mm-hugetlb-add-migration-entry-check-in-hugetlb_change_protection.patch This patch was dropped because an updated version will be merged ------------------------------------------------------ From: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx> Subject: mm/hugetlb: add migration entry check in hugetlb_change_protection There is a race condition between hugepage migration and change_protection(), where hugetlb_change_protection() doesn't care about migration entries and wrongly overwrites them. That causes unexpected results like kernel crash. This patch adds is_hugetlb_entry_(migration|hwpoisoned) check in this function and skip all such entries. Signed-off-by: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx> Cc: Hugh Dickins <hughd@xxxxxxxxxx> Cc: David Rientjes <rientjes@xxxxxxxxxx> Cc: Christoph Lameter <cl@xxxxxxxxx> Cc: Mel Gorman <mel@xxxxxxxxx> Cc: <stable@xxxxxxxxxxxxxxx> [3.12+] Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/hugetlb.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff -puN mm/hugetlb.c~mm-hugetlb-add-migration-entry-check-in-hugetlb_change_protection mm/hugetlb.c --- a/mm/hugetlb.c~mm-hugetlb-add-migration-entry-check-in-hugetlb_change_protection +++ a/mm/hugetlb.c @@ -3358,7 +3358,13 @@ unsigned long hugetlb_change_protection( spin_unlock(ptl); continue; } - if (!huge_pte_none(huge_ptep_get(ptep))) { + pte = huge_ptep_get(ptep); + if (unlikely(is_hugetlb_entry_migration(pte) || + is_hugetlb_entry_hwpoisoned(pte))) { + spin_unlock(ptl); + continue; + } + if (!huge_pte_none(pte)) { pte = huge_ptep_get_and_clear(mm, address, ptep); pte = pte_mkhuge(huge_pte_modify(pte, newprot)); pte = arch_make_huge_pte(pte, vma, NULL, 0); _ Patches currently in -mm which might be from n-horiguchi@xxxxxxxxxxxxx are origin.patch memory-hotplug-add-sysfs-zones_online_to-attribute.patch mm-hugetlb-remove-unused-argument-of-follow_huge_pmdpud.patch mm-introduce-do_shared_fault-and-drop-do_fault-fix-fix.patch do_shared_fault-check-that-mmap_sem-is-held.patch -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html