summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_map.c
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2004-05-07 00:17:07 +0000
committergreen <green@FreeBSD.org>2004-05-07 00:17:07 +0000
commit41ba6d4a4366807c759f8a29eb018183bd812b58 (patch)
tree6e37540cc0c1c2bd875e7ef9a29900a870792d4b /sys/vm/vm_map.c
parent832d1bd18183abf0012f495103d308a9f95ba2c0 (diff)
downloadFreeBSD-src-41ba6d4a4366807c759f8a29eb018183bd812b58.zip
FreeBSD-src-41ba6d4a4366807c759f8a29eb018183bd812b58.tar.gz
Properly remove MAP_FUTUREWIRE when a vm_map_entry gets torn down.
Previously, mlockall(2) usage would leak MAP_FUTUREWIRE of the process's vmspace::vm_map and subsequent processes would wire all of their memory. Coupled with a wired-page leak in vm_fault_unwire(), this would run the system out of free pages and cause programs to randomly SIGBUS when faulting in new pages. (Note that this is not the fix for the latter part; pages are still leaked when a wired area is unmapped in some cases.) Reviewed by: alc PR kern/62930
Diffstat (limited to 'sys/vm/vm_map.c')
-rw-r--r--sys/vm/vm_map.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/vm/vm_map.c b/sys/vm/vm_map.c
index 71e6d6a..a8b9e83 100644
--- a/sys/vm/vm_map.c
+++ b/sys/vm/vm_map.c
@@ -513,6 +513,7 @@ _vm_map_init(vm_map_t map, vm_offset_t min, vm_offset_t max)
map->min_offset = min;
map->max_offset = max;
map->first_free = &map->header;
+ map->flags = 0;
map->root = NULL;
map->timestamp = 0;
}
OpenPOWER on IntegriCloud