summaryrefslogtreecommitdiffstats
path: root/kernel/compat.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-12-23 23:14:49 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-12-26 01:15:03 -0500
commita566c288826ad4502e43b59570214f18173d7744 (patch)
treef95245e6aa2d4ba9edf7d065645254e19eefd693 /kernel/compat.c
parent8d9807b109497ca41d363dc7b6ff2bb6c0d52524 (diff)
downloadlinux-a566c288826ad4502e43b59570214f18173d7744.tar.bz2
x32: fix waitid()
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>
Diffstat (limited to 'kernel/compat.c')
-rw-r--r--kernel/compat.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/compat.c b/kernel/compat.c
index 0770ac57c62b..e5cc33c7122c 100644
--- a/kernel/compat.c
+++ b/kernel/compat.c
@@ -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;
}