提交 a566c288 编写于 作者: A Al Viro

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: NAl Viro <viro@zeniv.linux.org.uk>
上级 8d9807b1
...@@ -587,6 +587,10 @@ COMPAT_SYSCALL_DEFINE5(waitid, ...@@ -587,6 +587,10 @@ COMPAT_SYSCALL_DEFINE5(waitid,
return ret; return ret;
if (uru) { if (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); ret = put_compat_rusage(&ru, uru);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册