summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_exec.c
diff options
context:
space:
mode:
authormjg <mjg@FreeBSD.org>2015-06-10 10:48:12 +0000
committermjg <mjg@FreeBSD.org>2015-06-10 10:48:12 +0000
commitd7bc9285a673d676370f95a84ce93ef553c8688c (patch)
treedbbb077ee034cbfe839c1ba19dbe5ce374a5c6a3 /sys/kern/kern_exec.c
parent67f2eebb44e1f27017750eddaf5a5ea513cb9c71 (diff)
downloadFreeBSD-src-d7bc9285a673d676370f95a84ce93ef553c8688c.zip
FreeBSD-src-d7bc9285a673d676370f95a84ce93ef553c8688c.tar.gz
Implement lockless resource limits.
Use the same scheme implemented to manage credentials. Code needing to look at process's credentials (as opposed to thred's) is provided with *_proc variants of relevant functions. Places which possibly had to take the proc lock anyway still use the proc pointer to access limits.
Diffstat (limited to 'sys/kern/kern_exec.c')
-rw-r--r--sys/kern/kern_exec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c
index 8668f0d..d3ae4f0 100644
--- a/sys/kern/kern_exec.c
+++ b/sys/kern/kern_exec.c
@@ -1073,7 +1073,7 @@ exec_new_vmspace(imgp, sv)
if (imgp->stack_sz != 0) {
ssiz = trunc_page(imgp->stack_sz);
PROC_LOCK(p);
- lim_rlimit(p, RLIMIT_STACK, &rlim_stack);
+ lim_rlimit_proc(p, RLIMIT_STACK, &rlim_stack);
PROC_UNLOCK(p);
if (ssiz > rlim_stack.rlim_max)
ssiz = rlim_stack.rlim_max;
OpenPOWER on IntegriCloud