diff options
| author | Andrew Morton <akpm@digeo.com> | 2002-09-25 07:06:59 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-09-25 07:06:59 -0700 |
| commit | 02b1783c697786c1ac2bcaa892649ec0d27587bc (patch) | |
| tree | 00f87b37b20c9f1391621380bb9ae517815d94c0 | |
| parent | 5538fdaaa03a0fac812ddb82674d7c3e9e6b0972 (diff) | |
[PATCH] mprotect_fixup fix
From David M-T.
When this function successfully merges the new range into an existing
VMA, it forgets to extend the new protection mode into the just-merged
pages.
| -rw-r--r-- | mm/mprotect.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/mprotect.c b/mm/mprotect.c index fc1e3345d38b..be0096238437 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c @@ -187,7 +187,7 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev, * Try to merge with the previous vma. */ if (mprotect_attempt_merge(vma, *pprev, end, newflags)) - return 0; + goto success; } else { error = split_vma(mm, vma, start, 1); if (error) @@ -209,7 +209,7 @@ mprotect_fixup(struct vm_area_struct *vma, struct vm_area_struct **pprev, vma->vm_flags = newflags; vma->vm_page_prot = newprot; spin_unlock(&mm->page_table_lock); - +success: change_protection(vma, start, end, newprot); return 0; |
