Do not calculate the stack's bottom address twice.

Submitted by:	Olivц╘r Pintц╘r
Review:	https://reviews.freebsd.org/D2953
MFC after:	1 week
This commit is contained in:
kib 2015-06-30 15:22:47 +00:00
parent 15c2814234
commit ad2d1e43ad

View File

@ -1096,7 +1096,7 @@ exec_new_vmspace(imgp, sv)
* are still used to enforce the stack rlimit on the process stack.
*/
vmspace->vm_ssize = sgrowsiz >> PAGE_SHIFT;
vmspace->vm_maxsaddr = (char *)sv->sv_usrstack - ssiz;
vmspace->vm_maxsaddr = (char *)stack_addr;
return (0);
}