Commit 415235f3 authored by Anton Blanchard's avatar Anton Blanchard

[PATCH] compat_wait4 fix

sys_wait4 can return a pid and in this case we want to copy the struct
rusage out to userspace.
parent 2e3d689f
......@@ -368,8 +368,7 @@ compat_sys_wait4(compat_pid_t pid, compat_uint_t * stat_addr, int options,
ret = sys_wait4(pid, stat_addr ? &status : NULL, options, &r);
set_fs (old_fs);
if (!ret)
{
if (ret > 0) {
if (put_compat_rusage(ru, &r))
return -EFAULT;
if (stat_addr && put_user(status, stat_addr))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment