compat_wait4 fix
PATCH 1/1 compat_wait4 fix
Hi,
sys_wait4 can return a pid and in this case we want to copy the struct rusage out to userspace.
Anton
kernel/compat.c +1 -2
@@ -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))