mirror of
https://git.FreeBSD.org/src.git
synced 2025-02-05 18:05:16 +00:00
Do not coalesce stack entry, vm_map_stack() asserts that the requested
region is claimed by a new entry. Pass MAP_STACK_GROWS_DOWN and MAP_STACK_GROWS_UP flags to vm_map_insert() from vm_map_stack(), to really turn off coalescing code and call to vm_map_simplify_entry() [1]. Reported by: avg, peter, many Tested by: avg, peter Noted by: avg [1] Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
d3178d7d27
commit
b61a53d43d
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=259951
@ -1207,6 +1207,7 @@ charged:
|
||||
}
|
||||
else if ((prev_entry != &map->header) &&
|
||||
(prev_entry->eflags == protoeflags) &&
|
||||
(cow & (MAP_ENTRY_GROWS_DOWN | MAP_ENTRY_GROWS_UP)) == 0 &&
|
||||
(prev_entry->end == start) &&
|
||||
(prev_entry->wired_count == 0) &&
|
||||
(prev_entry->cred == cred ||
|
||||
@ -3339,7 +3340,6 @@ vm_map_stack(vm_map_t map, vm_offset_t addrbos, vm_size_t max_ssize,
|
||||
* NOTE: We explicitly allow bi-directional stacks.
|
||||
*/
|
||||
orient = cow & (MAP_STACK_GROWS_DOWN|MAP_STACK_GROWS_UP);
|
||||
cow &= ~orient;
|
||||
KASSERT(orient != 0, ("No stack grow direction"));
|
||||
|
||||
if (addrbos < vm_map_min(map) ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user