svn commit: r350607 - head/sys/kern
Konstantin Belousov
kostikbel at gmail.com
Mon Aug 5 19:19:18 UTC 2019
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 :
More information about the svn-src-all
mailing list