diff options
author | mjg <mjg@FreeBSD.org> | 2015-06-10 10:48:12 +0000 |
---|---|---|
committer | mjg <mjg@FreeBSD.org> | 2015-06-10 10:48:12 +0000 |
commit | d7bc9285a673d676370f95a84ce93ef553c8688c (patch) | |
tree | dbbb077ee034cbfe839c1ba19dbe5ce374a5c6a3 /sys/i386/linux/imgact_linux.c | |
parent | 67f2eebb44e1f27017750eddaf5a5ea513cb9c71 (diff) | |
download | FreeBSD-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/i386/linux/imgact_linux.c')
-rw-r--r-- | sys/i386/linux/imgact_linux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/i386/linux/imgact_linux.c b/sys/i386/linux/imgact_linux.c index 0a4114b..9363b47 100644 --- a/sys/i386/linux/imgact_linux.c +++ b/sys/i386/linux/imgact_linux.c @@ -108,7 +108,7 @@ exec_linux_imgact(struct image_params *imgp) */ PROC_LOCK(imgp->proc); if (a_out->a_text > maxtsiz || - a_out->a_data + bss_size > lim_cur(imgp->proc, RLIMIT_DATA) || + a_out->a_data + bss_size > lim_cur_proc(imgp->proc, RLIMIT_DATA) || racct_set(imgp->proc, RACCT_DATA, a_out->a_data + bss_size) != 0) { PROC_UNLOCK(imgp->proc); return (ENOMEM); |