diff options
| author | Roland McGrath <roland@redhat.com> | 2004-09-20 17:43:51 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-09-20 17:43:51 -0700 |
| commit | 7bae86e3377e3f5245d98fc9841ced8b02242f39 (patch) | |
| tree | 306d7572d05588f5dc4efc486e0ca0f6a59f69be | |
| parent | 7e6385a2dec8b46e583485930bb3942f6358fc41 (diff) | |
[PATCH] x86-64: waitid fallout
This patch updates the x86-64's compat code to handle the new argument
to waitid.
Sorry for the oversight.
| -rw-r--r-- | arch/x86_64/ia32/sys_ia32.c | 11 | ||||
| -rw-r--r-- | include/linux/syscalls.h | 3 |
2 files changed, 11 insertions, 3 deletions
diff --git a/arch/x86_64/ia32/sys_ia32.c b/arch/x86_64/ia32/sys_ia32.c index 96b0c653e216..50465345140a 100644 --- a/arch/x86_64/ia32/sys_ia32.c +++ b/arch/x86_64/ia32/sys_ia32.c @@ -1152,19 +1152,26 @@ asmlinkage long sys32_clone(unsigned int clone_flags, unsigned int newsp, } asmlinkage long sys32_waitid(int which, compat_pid_t pid, - siginfo_t32 __user *uinfo, int options) + siginfo_t32 __user *uinfo, int options, + struct compat_rusage __user *uru) { siginfo_t info; + struct rusage ru; long ret; mm_segment_t old_fs = get_fs(); info.si_signo = 0; set_fs (KERNEL_DS); - ret = sys_waitid(which, pid, (siginfo_t __user *) &info, 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))) + return ret; + BUG_ON(info.si_code & __SI_MASK); info.si_code |= __SI_CHLD; return ia32_copy_siginfo_to_user(uinfo, &info); diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index a102bb035bf3..c08b42e2bee4 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -163,7 +163,8 @@ asmlinkage void sys_exit_group(int error_code); asmlinkage long sys_wait4(pid_t pid, int __user *stat_addr, int options, struct rusage __user *ru); asmlinkage long sys_waitid(int which, pid_t pid, - struct siginfo __user *infop, int options); + struct siginfo __user *infop, + int options, struct rusage __user *ru); asmlinkage long sys_waitpid(pid_t pid, int __user *stat_addr, int options); asmlinkage long sys_set_tid_address(int __user *tidptr); asmlinkage long sys_futex(u32 __user *uaddr, int op, int val, |
