mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-03 12:35:02 +00:00
Disable stack growth when accessed by AIO daemons.
Commit message for r321173 incorrectly stated that the change disables automatic stack growth from the AIO daemons contexts, with explanation that this is currently prevents applying wrong resource limits. Fix this by actually disabling the growth. Noted by: alc Reviewed by: alc, jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
5a3924b985
commit
eb5ea8788f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=321230
@ -3698,8 +3698,15 @@ vm_map_growstack(vm_map_t map, vm_offset_t addr, vm_map_entry_t gap_entry)
|
||||
|
||||
p = curproc;
|
||||
vm = p->p_vmspace;
|
||||
if (map != &p->p_vmspace->vm_map)
|
||||
|
||||
/*
|
||||
* Disallow stack growth when the access is performed by a
|
||||
* debugger or AIO daemon. The reason is that the wrong
|
||||
* resource limits are applied.
|
||||
*/
|
||||
if (map != &p->p_vmspace->vm_map || p->p_textvp == NULL)
|
||||
return (KERN_FAILURE);
|
||||
|
||||
MPASS(!map->system_map);
|
||||
|
||||
guard = stack_guard_page * PAGE_SIZE;
|
||||
|
Loading…
Reference in New Issue
Block a user