diff options
Diffstat (limited to 'sys/kern/kern_resource.c')
-rw-r--r-- | sys/kern/kern_resource.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index 32c27ed..647cee8 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -701,6 +701,8 @@ kern_setrlimit(td, which, limp) limp->rlim_max = 1; break; } + if (td->td_proc->p_sysent->sv_fixlimit != NULL) + td->td_proc->p_sysent->sv_fixlimit(limp, which); *alimp = *limp; p->p_limit = newlim; PROC_UNLOCK(p); @@ -734,12 +736,6 @@ kern_setrlimit(td, which, limp) } } - /* - * The data size limit may need to be changed to a value - * that makes sense for the 32 bit binary. - */ - if (p->p_sysent->sv_fixlimits != NULL) - p->p_sysent->sv_fixlimits(p); return (0); } @@ -1062,6 +1058,8 @@ lim_rlimit(struct proc *p, int which, struct rlimit *rlp) KASSERT(which >= 0 && which < RLIM_NLIMITS, ("request for invalid resource limit")); *rlp = p->p_limit->pl_rlimit[which]; + if (p->p_sysent->sv_fixlimit != NULL) + p->p_sysent->sv_fixlimit(rlp, which); } /* |