|
@@ -1611,10 +1611,8 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
|
|
flush_cache_page(vma, address, pte_pfn(orig_pte));
|
|
flush_cache_page(vma, address, pte_pfn(orig_pte));
|
|
entry = pte_mkyoung(orig_pte);
|
|
entry = pte_mkyoung(orig_pte);
|
|
entry = maybe_mkwrite(pte_mkdirty(entry), vma);
|
|
entry = maybe_mkwrite(pte_mkdirty(entry), vma);
|
|
- if (ptep_set_access_flags(vma, address, page_table, entry,1)) {
|
|
|
|
|
|
+ if (ptep_set_access_flags(vma, address, page_table, entry,1))
|
|
update_mmu_cache(vma, address, entry);
|
|
update_mmu_cache(vma, address, entry);
|
|
- lazy_mmu_prot_update(entry);
|
|
|
|
- }
|
|
|
|
ret |= VM_FAULT_WRITE;
|
|
ret |= VM_FAULT_WRITE;
|
|
goto unlock;
|
|
goto unlock;
|
|
}
|
|
}
|
|
@@ -1650,7 +1648,6 @@ gotten:
|
|
flush_cache_page(vma, address, pte_pfn(orig_pte));
|
|
flush_cache_page(vma, address, pte_pfn(orig_pte));
|
|
entry = mk_pte(new_page, vma->vm_page_prot);
|
|
entry = mk_pte(new_page, vma->vm_page_prot);
|
|
entry = maybe_mkwrite(pte_mkdirty(entry), vma);
|
|
entry = maybe_mkwrite(pte_mkdirty(entry), vma);
|
|
- lazy_mmu_prot_update(entry);
|
|
|
|
/*
|
|
/*
|
|
* Clear the pte entry and flush it first, before updating the
|
|
* Clear the pte entry and flush it first, before updating the
|
|
* pte with the new entry. This will avoid a race condition
|
|
* pte with the new entry. This will avoid a race condition
|
|
@@ -2180,7 +2177,6 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
|
|
|
|
|
|
/* No need to invalidate - it was non-present before */
|
|
/* No need to invalidate - it was non-present before */
|
|
update_mmu_cache(vma, address, entry);
|
|
update_mmu_cache(vma, address, entry);
|
|
- lazy_mmu_prot_update(entry);
|
|
|
|
unlock:
|
|
unlock:
|
|
pte_unmap_unlock(page_table, ptl);
|
|
pte_unmap_unlock(page_table, ptl);
|
|
return 0;
|
|
return 0;
|
|
@@ -2333,7 +2329,6 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
|
|
|
|
|
|
/* no need to invalidate: a not-present page won't be cached */
|
|
/* no need to invalidate: a not-present page won't be cached */
|
|
update_mmu_cache(vma, address, entry);
|
|
update_mmu_cache(vma, address, entry);
|
|
- lazy_mmu_prot_update(entry);
|
|
|
|
} else {
|
|
} else {
|
|
if (anon)
|
|
if (anon)
|
|
page_cache_release(page);
|
|
page_cache_release(page);
|
|
@@ -2505,7 +2500,6 @@ static inline int handle_pte_fault(struct mm_struct *mm,
|
|
entry = pte_mkyoung(entry);
|
|
entry = pte_mkyoung(entry);
|
|
if (ptep_set_access_flags(vma, address, pte, entry, write_access)) {
|
|
if (ptep_set_access_flags(vma, address, pte, entry, write_access)) {
|
|
update_mmu_cache(vma, address, entry);
|
|
update_mmu_cache(vma, address, entry);
|
|
- lazy_mmu_prot_update(entry);
|
|
|
|
} else {
|
|
} else {
|
|
/*
|
|
/*
|
|
* This is needed only for protection faults but the arch code
|
|
* This is needed only for protection faults but the arch code
|