summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authorjlemon <jlemon@FreeBSD.org>1997-09-12 15:58:47 +0000
committerjlemon <jlemon@FreeBSD.org>1997-09-12 15:58:47 +0000
commit0eba88d0be7e6e2f8d45f440de4767003f6274dc (patch)
treef79451f2016f2cfc33e970df366a9815632f7bdc /sys/vm
parentdf823fc604c41c13cbcb6ba3582f2c254527e1d7 (diff)
downloadFreeBSD-src-0eba88d0be7e6e2f8d45f440de4767003f6274dc.zip
FreeBSD-src-0eba88d0be7e6e2f8d45f440de4767003f6274dc.tar.gz
Do not consider VM_PROT_OVERRIDE_WRITE to be part of the protection
entry when handling a fault. This is set by procfs whenever it wants to write to a page, as a means of overriding `r-x COW' entries, but causes failures in the `rwx' case. Submitted by: bde
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_map.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index d2e9f4b..1b7e1ac 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -61,7 +61,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: vm_map.c,v 1.88 1997/08/25 22:15:22 bde Exp $
+ * $Id: vm_map.c,v 1.89 1997/09/01 03:17:18 bde Exp $
*/
/*
@@ -2287,7 +2287,8 @@ RetryLookup:;
if ((fault_type & VM_PROT_OVERRIDE_WRITE) == 0 ||
(entry->eflags & MAP_ENTRY_COW) == 0 ||
(entry->wired_count != 0)) {
- if ((fault_type & (prot)) != fault_type)
+ if ((fault_type & (prot)) !=
+ (fault_type & ~VM_PROT_OVERRIDE_WRITE))
RETURN(KERN_PROTECTION_FAILURE);
}
OpenPOWER on IntegriCloud