Commit e2630dd6 authored by David S. Miller's avatar David S. Miller

[SPARC64]: Update compat code for sys_waitid changes.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7bae86e3
......@@ -1737,21 +1737,30 @@ sys32_timer_create(u32 clock, struct sigevent32 __user *se32,
}
asmlinkage long compat_sys_waitid(u32 which, u32 pid,
struct siginfo32 __user *uinfo, u32 options)
struct siginfo32 __user *uinfo, u32 options,
struct compat_rusage __user *uru)
{
siginfo_t info;
struct rusage ru;
long ret;
mm_segment_t old_fs = get_fs();
memset(&info, 0, sizeof(info));
set_fs (KERNEL_DS);
ret = sys_waitid((int)which, (compat_pid_t) pid,
(siginfo_t __user *) &info, (int) options);
ret = sys_waitid(which, pid, (siginfo_t __user *) &info,
options, uru ? &ru : NULL);
set_fs (old_fs);
if (ret < 0 || info.si_signo == 0)
return ret;
if (uru) {
ret = put_compat_rusage(&ru, uru);
if (ret)
return ret;
}
BUG_ON(info.si_code & __SI_MASK);
info.si_code |= __SI_CHLD;
return copy_siginfo_to_user32(uinfo, &info);
......
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