From f6f6d24062224a443ecd5e3945cf25127ee819fe Mon Sep 17 00:00:00 2001 From: Mateusz Guzik Date: Wed, 10 Jun 2015 10:48:12 +0000 Subject: 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. --- sys/kern/subr_uio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'sys/kern/subr_uio.c') 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); -- cgit v1.2.3