1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

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
This commit is contained in:
Brian Feldman 2004-05-07 00:17:07 +00:00
parent 2bde81acd6
commit af7cd0c521
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=129018

View File

@ -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;
}