vm_map_growstack(): use local for p->p_vmspace

Noted by:	alc
Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
Konstantin Belousov
2026-05-07 22:58:18 +03:00
parent 2c88636e0e
commit 8eef59db25
+1 -2
View File
@@ -4761,8 +4761,7 @@ vm_map_growstack(vm_map_t map, vm_offset_t addr, vm_map_entry_t gap_entry)
* debugger or AIO daemon. The reason is that the wrong
* resource limits are applied.
*/
if (p != initproc && (map != &p->p_vmspace->vm_map ||
p->p_textvp == NULL))
if (p != initproc && (map != &vm->vm_map || p->p_textvp == NULL))
return (KERN_FAILURE);
MPASS(!vm_map_is_system(map));