[PATCH] compat_wait4 fix

Anton Blanchard (anton@samba.org)
Thu, 29 May 2003 14:06:31 +1000


Hi,

sys_wait4 can return a pid and in this case we want to copy the struct
rusage out to userspace.

Anton

--- gr9/kernel/compat.c 2003-04-17 15:26:39.000000000 -0500
+++ gr9_cacheable_smp_h_2/kernel/compat.c 2003-05-28 21:29:06.000000000 -0500
@@ -362,8 +362,7 @@
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))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/