Commit dffb6acd authored by Anton Blanchard's avatar Anton Blanchard

[PATCH] fix compat_sys_getrusage

compat_sys_getrusage was returning the result of a logical or. Make
it return the result of sys_getrusage if it fails or -EFAULT if we
cant write it out to userspace.
parent 7015b1a3
......@@ -349,7 +349,11 @@ asmlinkage long compat_sys_getrusage(int who, struct compat_rusage *ru)
ret = sys_getrusage(who, &r);
set_fs(old_fs);
return ret || put_compat_rusage(ru, &r);
if (ret)
return ret;
if (put_compat_rusage(ru, &r))
return -EFAULT;
}
asmlinkage long
......
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