summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>2009-10-31 17:39:56 +0000
committeralc <alc@FreeBSD.org>2009-10-31 17:39:56 +0000
commitb6a248b75a3a9d6da03ab21c9cee4d0cf11ee929 (patch)
tree9393daf8bed51c4f9d21a3bb5be0c19c43a5133d /sys/vm
parentb44c3ebbbe706bb08a658e72f84bd610e718d00e (diff)
downloadFreeBSD-src-b6a248b75a3a9d6da03ab21c9cee4d0cf11ee929.zip
FreeBSD-src-b6a248b75a3a9d6da03ab21c9cee4d0cf11ee929.tar.gz
Correct an error in vm_fault_copy_entry() that has existed since the first
version of this file. When a process forks, any wired pages are immediately copied because copy-on-write is not supported for wired pages. In other words, the child process is given its own private copy of each wired page from its parent's address space. Unfortunately, to date, these copied pages have been mapped into the child's address space with the wrong permissions, typically VM_PROT_ALL. This change corrects the permissions. Reviewed by: kib
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_fault.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
index 68057fb..de87183 100644
--- a/sys/vm/vm_fault.c
+++ b/sys/vm/vm_fault.c
@@ -1179,7 +1179,7 @@ vm_fault_copy_entry(vm_map_t dst_map, vm_map_t src_map,
dst_object->uip = dst_entry->uip;
dst_entry->uip = NULL;
}
- access = prot = dst_entry->max_protection;
+ access = prot = dst_entry->protection;
/*
* If not an upgrade, then enter the mappings in the pmap as
* read and/or execute accesses. Otherwise, enter them as
OpenPOWER on IntegriCloud