Minor correction to revision 1.258: Use the proc pointer that is passed to

vm_map_growstack() in the RLIMIT_VMEM check rather than curthread.
This commit is contained in:
Alan Cox 2003-12-26 21:54:45 +00:00
parent d910ed771d
commit 75898105c0

View File

@ -2677,8 +2677,7 @@ Retry:
}
/* If we would blow our VMEM resource limit, no go */
if (map->size + grow_amount >
curthread->td_proc->p_rlimit[RLIMIT_VMEM].rlim_cur) {
if (map->size + grow_amount > p->p_rlimit[RLIMIT_VMEM].rlim_cur) {
vm_map_unlock_read(map);
return (KERN_NO_SPACE);
}