Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Aug 2019 19:16:34 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r350607 - head/sys/kern
Message-ID:  <201908051916.x75JGYcS051757@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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
  
  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?201908051916.x75JGYcS051757>