X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=mm%2Fmprotect.c;h=8eb7bb40dc40b6e8e89d05fbb7e05f8c836e05da;hb=660f6fea425db4398a6c94747a5da9be8ca8989f;hp=c764402c464f10471d4b267fa26911f46e87e149;hpb=58cf279acac3080ce03eeea5ca268210b3165fe1;p=deliverable%2Flinux.git diff --git a/mm/mprotect.c b/mm/mprotect.c index c764402c464f..8eb7bb40dc40 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c @@ -149,7 +149,8 @@ static inline unsigned long change_pmd_range(struct vm_area_struct *vma, unsigned long this_pages; next = pmd_addr_end(addr, end); - if (!pmd_trans_huge(*pmd) && pmd_none_or_clear_bad(pmd)) + if (!pmd_trans_huge(*pmd) && !pmd_devmap(*pmd) + && pmd_none_or_clear_bad(pmd)) continue; /* invoke the mmu notifier if the pmd is populated */ @@ -158,9 +159,9 @@ static inline unsigned long change_pmd_range(struct vm_area_struct *vma, mmu_notifier_invalidate_range_start(mm, mni_start, end); } - if (pmd_trans_huge(*pmd)) { + if (pmd_trans_huge(*pmd) || pmd_devmap(*pmd)) { if (next - addr != HPAGE_PMD_SIZE) - split_huge_page_pmd(vma, addr, pmd); + split_huge_pmd(vma, pmd, addr); else { int nr_ptes = change_huge_pmd(vma, pmd, addr, newprot, prot_numa);