summaryrefslogtreecommitdiffstats
path: root/sys/vm/vm_mmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/vm/vm_mmap.c')
-rw-r--r--sys/vm/vm_mmap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/vm/vm_mmap.c b/sys/vm/vm_mmap.c
index d38a631..933e580 100644
--- a/sys/vm/vm_mmap.c
+++ b/sys/vm/vm_mmap.c
@@ -277,8 +277,10 @@ mmap(td, uap)
*/
else if (addr == 0 ||
(addr >= round_page((vm_offset_t)vms->vm_taddr) &&
- addr < round_page((vm_offset_t)vms->vm_daddr + maxdsiz)))
- addr = round_page((vm_offset_t)vms->vm_daddr + maxdsiz);
+ addr < round_page((vm_offset_t)vms->vm_daddr +
+ td->td_proc->p_rlimit[RLIMIT_DATA].rlim_max)))
+ addr = round_page((vm_offset_t)vms->vm_daddr +
+ td->td_proc->p_rlimit[RLIMIT_DATA].rlim_max);
mtx_lock(&Giant); /* syscall marked mp-safe but isn't */
do {
OpenPOWER on IntegriCloud