vm: don't lock proc around accesses to vm_{t,d}addr and RLIMIT_DATA in sys_mmap
vm_{t,d}addr are constant and we can use thread's copy of resource limits
This commit is contained in:
parent
6c5f7b239f
commit
cd336bad26
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=285054
@ -312,14 +312,12 @@ sys_mmap(td, uap)
|
||||
* There should really be a pmap call to determine a reasonable
|
||||
* location.
|
||||
*/
|
||||
PROC_LOCK(td->td_proc);
|
||||
if (addr == 0 ||
|
||||
(addr >= round_page((vm_offset_t)vms->vm_taddr) &&
|
||||
addr < round_page((vm_offset_t)vms->vm_daddr +
|
||||
lim_max_proc(td->td_proc, RLIMIT_DATA))))
|
||||
lim_max(td, RLIMIT_DATA))))
|
||||
addr = round_page((vm_offset_t)vms->vm_daddr +
|
||||
lim_max_proc(td->td_proc, RLIMIT_DATA));
|
||||
PROC_UNLOCK(td->td_proc);
|
||||
lim_max(td, RLIMIT_DATA));
|
||||
}
|
||||
if (size == 0) {
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user