aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/subr_uio.c
diff options
context:
space:
mode:
authorMateusz Guzik <mjg@FreeBSD.org>2015-06-10 10:48:12 +0000
committerMateusz Guzik <mjg@FreeBSD.org>2015-06-10 10:48:12 +0000
commitf6f6d24062224a443ecd5e3945cf25127ee819fe (patch)
treedbbb077ee034cbfe839c1ba19dbe5ce374a5c6a3 /sys/kern/subr_uio.c
parent4ea6a9a28fd7ae3cc6e8697bc93f9ce5ea6b6262 (diff)
downloadsrc-f6f6d24062224a443ecd5e3945cf25127ee819fe.tar.gz
src-f6f6d24062224a443ecd5e3945cf25127ee819fe.zip
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.
Notes
Notes: svn path=/head/; revision=284215
Diffstat (limited to 'sys/kern/subr_uio.c')
-rw-r--r--sys/kern/subr_uio.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/kern/subr_uio.c b/sys/kern/subr_uio.c
index 410085e3c47c..aac6eb6f5e94 100644
--- a/sys/kern/subr_uio.c
+++ b/sys/kern/subr_uio.c
@@ -409,10 +409,8 @@ copyout_map(struct thread *td, vm_offset_t *addr, size_t sz)
/*
* Map somewhere after heap in process memory.
*/
- PROC_LOCK(td->td_proc);
*addr = round_page((vm_offset_t)vms->vm_daddr +
- lim_max(td->td_proc, RLIMIT_DATA));
- PROC_UNLOCK(td->td_proc);
+ lim_max(td, RLIMIT_DATA));
/* round size up to page boundry */
size = (vm_size_t)round_page(sz);