Skip to content

Commit

Permalink
x32: fix waitid()
Browse files Browse the repository at this point in the history
It needs 64bit rusage and 32bit siginfo.  glibc never calls it with
non-NULL rusage pointer, or we would've seen breakage already...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Dec 26, 2012
1 parent 8d9807b commit a566c28
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion kernel/compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,11 @@ COMPAT_SYSCALL_DEFINE5(waitid,
return ret;

if (uru) {
ret = put_compat_rusage(&ru, uru);
/* sys_waitid() overwrites everything in ru */
if (COMPAT_USE_64BIT_TIME)
ret = copy_to_user(uru, &ru, sizeof(ru));
else
ret = put_compat_rusage(&ru, uru);
if (ret)
return ret;
}
Expand Down

0 comments on commit a566c28

Please sign in to comment.