summaryrefslogtreecommitdiffstats
path: root/sys/alpha/linux/linux_machdep.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/alpha/linux/linux_machdep.c')
-rw-r--r--sys/alpha/linux/linux_machdep.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/alpha/linux/linux_machdep.c b/sys/alpha/linux/linux_machdep.c
index b0cd44b..061928c 100644
--- a/sys/alpha/linux/linux_machdep.c
+++ b/sys/alpha/linux/linux_machdep.c
@@ -382,7 +382,7 @@ linux_setrlimit(td, uap)
if ((error =
copyin(uap->rlim, &rlim, sizeof (struct rlimit))))
return (error);
- return dosetrlimit(td, which, &rlim);
+ return (kern_setrlimit(td, which, &rlim));
}
int
@@ -390,7 +390,9 @@ linux_getrlimit(td, uap)
struct thread *td;
struct linux_getrlimit_args *uap;
{
+ struct rlimit rlim;
u_int which;
+ int error;
#ifdef DEBUG
if (ldebug(getrlimit))
@@ -405,6 +407,9 @@ linux_getrlimit(td, uap)
if (which == -1)
return EINVAL;
- return (copyout(&td->td_proc->p_rlimit[which],
- uap->rlim, sizeof (struct rlimit)));
+ PROC_LOCK(td->td_proc);
+ lim_rlimit(td->td_proc, which, &rlim);
+ PROC_UNLOCK(td->td_proc);
+ error = copyout(&rlim, uap->rlim, sizeof (struct rlimit));
+ return (error);
}
OpenPOWER on IntegriCloud