[patch] make mprotect() work again

From: David Mosberger (davidm@napali.hpl.hp.com)
Date: Wed Sep 25 2002 - 18:00:15 EST


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/



This archive was generated by hypermail 2b29 : Mon Sep 30 2002 - 22:00:24 EST