Date: Mon, 5 Aug 2019 22:19:01 +0300 From: Konstantin Belousov <kostikbel@gmail.com> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r350607 - head/sys/kern Message-ID: <20190805191901.GB2731@kib.kiev.ua> In-Reply-To: <201908051916.x75JGYcS051757@repo.freebsd.org> References: <201908051916.x75JGYcS051757@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Aug 05, 2019 at 07:16:34PM +0000, Konstantin Belousov wrote: > Author: kib > Date: Mon Aug 5 19:16:33 2019 > New Revision: 350607 > URL: https://svnweb.freebsd.org/changeset/base/350607 > > Log: > Fix mis-merge This should have been: Account for the stack limit when calculating effective stack size. > > Sponsored by: The FreeBSD Foundation > MFC after: 1 week > > Modified: > head/sys/kern/kern_exec.c > > Modified: head/sys/kern/kern_exec.c > ============================================================================== > --- head/sys/kern/kern_exec.c Mon Aug 5 18:59:53 2019 (r350606) > +++ head/sys/kern/kern_exec.c Mon Aug 5 19:16:33 2019 (r350607) > @@ -1128,7 +1128,9 @@ exec_new_vmspace(struct image_params *imgp, struct sys > } else { > ssiz = maxssiz; > } > - imgp->eff_stack_sz = ssiz; > + imgp->eff_stack_sz = lim_cur(curthread, RLIMIT_STACK); > + if (ssiz < imgp->eff_stack_sz) > + imgp->eff_stack_sz = ssiz; > stack_addr = sv->sv_usrstack - ssiz; > error = vm_map_stack(map, stack_addr, (vm_size_t)ssiz, > obj != NULL && imgp->stack_prot != 0 ? imgp->stack_prot :
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190805191901.GB2731>