mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 09:41:03 -04:00
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.
This commit is contained in:
parent
e1da8747e7
commit
2ed14a92db
1 changed files with 5 additions and 4 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue