[PATCH] compat_wait4 fix

From: Anton Blanchard (anton@samba.org)
Date: Wed May 28 2003 - 23:15:07 EST



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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/