X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=mm%2Fhugetlb.c;h=85032de5e20f88bdef36f8fa54b71ae826f53f13;hb=94ae1db226a5bcbb48372d81161f084c9e283fd8;hp=47f6070d7c46fa5d631c5ceeb64b9a31ab2553cf;hpb=7a02d089695a1217992434f03a78aa32bad85b5c;p=cascardo%2Flinux.git diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 47f6070d7c46..85032de5e20f 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -2598,8 +2598,11 @@ int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src, } set_huge_pte_at(dst, addr, dst_pte, entry); } else { - if (cow) + if (cow) { huge_ptep_set_wrprotect(src, addr, src_pte); + mmu_notifier_invalidate_range(src, mmun_start, + mmun_end); + } entry = huge_ptep_get(src_pte); ptepage = pte_page(entry); get_page(ptepage); @@ -2901,6 +2904,7 @@ retry_avoidcopy: /* Break COW */ huge_ptep_clear_flush(vma, address, ptep); + mmu_notifier_invalidate_range(mm, mmun_start, mmun_end); set_huge_pte_at(mm, address, ptep, make_huge_pte(vma, new_page, 1)); page_remove_rmap(old_page); @@ -3376,6 +3380,7 @@ unsigned long hugetlb_change_protection(struct vm_area_struct *vma, * and that page table be reused and filled with junk. */ flush_tlb_range(vma, start, end); + mmu_notifier_invalidate_range(mm, start, end); i_mmap_unlock_write(vma->vm_file->f_mapping); mmu_notifier_invalidate_range_end(mm, start, end);