summaryrefslogtreecommitdiff
path: root/mm/mprotect.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/mprotect.c')
-rw-r--r--mm/mprotect.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/mprotect.c b/mm/mprotect.c
index 1b9198d38cdf..45a87f0ce625 100644
--- a/mm/mprotect.c
+++ b/mm/mprotect.c
@@ -542,6 +542,7 @@ static const struct mm_walk_ops prot_none_walk_ops = {
.pte_entry = prot_none_pte_entry,
.hugetlb_entry = prot_none_hugetlb_entry,
.test_walk = prot_none_test,
+ .walk_lock = PGWALK_WRLOCK,
};
int
@@ -630,6 +631,7 @@ success:
* vm_flags and vm_page_prot are protected by the mmap_lock
* held in write mode.
*/
+ vma_start_write(vma);
vm_flags_reset(vma, newflags);
/*
* We want to check manually if we can change individual PTEs writable