summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authoralc <alc@FreeBSD.org>1999-11-23 06:51:28 +0000
committeralc <alc@FreeBSD.org>1999-11-23 06:51:28 +0000
commit5d1cd5631b7c455216547ca3831b9352a824a7ee (patch)
tree998dfb42bec74225475941afcadc2de9b5747cc0 /sys/vm
parent8a8ecd0abc499a9487cc5b0388a47f40da54f36a (diff)
downloadFreeBSD-src-5d1cd5631b7c455216547ca3831b9352a824a7ee.zip
FreeBSD-src-5d1cd5631b7c455216547ca3831b9352a824a7ee.tar.gz
Correct the following error: vm_map_pageable() on a COW'ed (post-fork)
vm_map always failed because vm_map_lookup() looked at "vm_map_entry->wired_count" instead of "(vm_map_entry->eflags & MAP_ENTRY_USER_WIRED)". The effect was that many page wiring operations by sysctl were (silently) failing.
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_map.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 5f429d0..ca42708 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -2510,10 +2510,11 @@ RetryLookup:;
RETURN(KERN_PROTECTION_FAILURE);
}
- if (entry->wired_count && (fault_type & VM_PROT_WRITE) &&
- (entry->eflags & MAP_ENTRY_COW) &&
- (fault_typea & VM_PROT_OVERRIDE_WRITE) == 0) {
- RETURN(KERN_PROTECTION_FAILURE);
+ if ((entry->eflags & MAP_ENTRY_USER_WIRED) &&
+ (entry->eflags & MAP_ENTRY_COW) &&
+ (fault_type & VM_PROT_WRITE) &&
+ (fault_typea & VM_PROT_OVERRIDE_WRITE) == 0) {
+ RETURN(KERN_PROTECTION_FAILURE);
}
/*
OpenPOWER on IntegriCloud