Commit 586b148b authored by Anton Blanchard's avatar Anton Blanchard

ppc64: add get/put_compat_timespec from Stephen Rothwell

parent bfaa30f1
......@@ -720,18 +720,11 @@ long sys32_rt_sigtimedwait(sigset32_t *uthese, siginfo_t32 *uinfo,
case 2: s.sig[1] = s32.sig[2] | (((long)s32.sig[3]) << 32);
case 1: s.sig[0] = s32.sig[0] | (((long)s32.sig[1]) << 32);
}
if (uts) {
ret = get_user(t.tv_sec, &uts->tv_sec);
ret |= __get_user(t.tv_nsec, &uts->tv_nsec);
if (ret)
return -EFAULT;
}
if (uts && get_compat_timespec(&t, uts))
return -EFAULT;
set_fs(KERNEL_DS);
if (uts)
ret = sys_rt_sigtimedwait(&s, &info, &t, sigsetsize);
else
ret = sys_rt_sigtimedwait(&s, &info, (struct timespec *)uts,
sigsetsize);
ret = sys_rt_sigtimedwait(&s, uinfo ? &info : NULL, uts ? &t : NULL,
sigsetsize);
set_fs(old_fs);
if (ret >= 0 && uinfo) {
if (copy_siginfo_to_user32(uinfo, &info))
......
......@@ -3603,10 +3603,8 @@ asmlinkage int sys32_sched_rr_get_interval(u32 pid, struct compat_timespec *inte
set_fs (KERNEL_DS);
ret = sys_sched_rr_get_interval((int)pid, &t);
set_fs (old_fs);
if (put_user (t.tv_sec, &interval->tv_sec) ||
__put_user (t.tv_nsec, &interval->tv_nsec))
if (put_compat_timespec(&t, interval))
return -EFAULT;
return ret;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment