aboutsummaryrefslogtreecommitdiff
path: root/sys/posix4
diff options
context:
space:
mode:
authorAlfred Perlstein <alfred@FreeBSD.org>2003-01-07 20:10:04 +0000
committerAlfred Perlstein <alfred@FreeBSD.org>2003-01-07 20:10:04 +0000
commita11acc6f8af1c736912830054ee936b3cfe45a02 (patch)
treeec6cc23ca347ad8e2171856c52604380f1b1b5db /sys/posix4
parent1f17965656c2641f0280161ac47f3ca237673df9 (diff)
downloadsrc-a11acc6f8af1c736912830054ee936b3cfe45a02.tar.gz
src-a11acc6f8af1c736912830054ee936b3cfe45a02.zip
Use copyout to access user memory.
Submittted by: pho MFC After: 2 days
Notes
Notes: svn path=/head/; revision=108896
Diffstat (limited to 'sys/posix4')
-rw-r--r--sys/posix4/p1003_1b.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/posix4/p1003_1b.c b/sys/posix4/p1003_1b.c
index 7d312d7711db..26d3e66d0bda 100644
--- a/sys/posix4/p1003_1b.c
+++ b/sys/posix4/p1003_1b.c
@@ -306,6 +306,7 @@ int sched_rr_get_interval(struct thread *td,
{
int e;
struct thread *targettd;
+ struct timespec timespec;
struct proc *targetp;
mtx_lock(&Giant);
@@ -326,7 +327,10 @@ int sched_rr_get_interval(struct thread *td,
PROC_UNLOCK(targetp);
if (e == 0) {
e = ksched_rr_get_interval(&td->td_retval[0], ksched, targettd,
- uap->interval);
+ &timespec);
+ if (e == 0)
+ e = copyout(&timespec, uap->interval,
+ sizeof(timespec));
}
done2:
mtx_unlock(&Giant);