[patch] make mprotect() work again

David Mosberger (davidm@napali.hpl.hp.com)
Wed, 25 Sep 2002 16:00:15 -0700


This patch:

ChangeSet@1.536.31.4, 2002-09-17 20:35:47-07:00, akpm@digeo.com
[PATCH] consolidate the VMA splitting code

broke mprotect(). The patch below makes it work again.

--david

===== mm/mprotect.c 1.16 vs edited =====
--- 1.16/mm/mprotect.c Tue Sep 17 11:05:14 2002
+++ edited/mm/mprotect.c Wed Sep 25 15:48:39 2002
@@ -186,8 +186,10 @@
/*
* Try to merge with the previous vma.
*/
- if (mprotect_attempt_merge(vma, *pprev, end, newflags))
+ if (mprotect_attempt_merge(vma, *pprev, end, newflags)) {
+ change_protection(vma, start, end, newprot);
return 0;
+ }
} else {
error = split_vma(mm, vma, start, 1);
if (error)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/