summaryrefslogtreecommitdiffstats
path: root/sys/vm
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2009-07-12 12:37:38 +0000
committerkib <kib@FreeBSD.org>2009-07-12 12:37:38 +0000
commit871f788d7999e4e656af64c93e1382a8945f4399 (patch)
tree162d2a581898976c5032c768468ed755000b96c0 /sys/vm
parente13a0a527a82a9d4a76fd516acc591a2944ed4d1 (diff)
downloadFreeBSD-src-871f788d7999e4e656af64c93e1382a8945f4399.zip
FreeBSD-src-871f788d7999e4e656af64c93e1382a8945f4399.tar.gz
When VM_MAP_WIRE_HOLESOK is not specified and vm_map_wire(9) encounters
non-readable and non-executable map entry, the entry is skipped from wiring and loop is aborted. But, since MAP_ENTRY_WIRE_SKIPPED was not set for the map entry, its wired_count is later erronously decremented. vm_map_delete(9) for such map entry stuck in "vmmaps". Properly set MAP_ENTRY_WIRE_SKIPPED when aborting the loop. Reported by: John Marshall <john.marshall riverwillow com au> Approved by: re (kensmith)
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_map.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 7cc2c2d..dc7a490 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -2354,12 +2354,12 @@ vm_map_wire(vm_map_t map, vm_offset_t start, vm_offset_t end,
if (entry->wired_count == 0) {
if ((entry->protection & (VM_PROT_READ|VM_PROT_EXECUTE))
== 0) {
+ entry->eflags |= MAP_ENTRY_WIRE_SKIPPED;
if ((flags & VM_MAP_WIRE_HOLESOK) == 0) {
end = entry->end;
rv = KERN_INVALID_ADDRESS;
goto done;
}
- entry->eflags |= MAP_ENTRY_WIRE_SKIPPED;
goto next_entry;
}
entry->wired_count++;
OpenPOWER on IntegriCloud