From: Al Viro Date: Mon, 24 Dec 2012 04:14:49 +0000 (-0500) Subject: x32: fix waitid() X-Git-Tag: v3.8-rc5~35^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a566c288826ad4502e43b59570214f18173d7744;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git 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 --- diff --git a/kernel/compat.c b/kernel/compat.c index 0770ac5..e5cc33c 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; }