fix osf_wait4() breakage
PATCH 1/1 fix osf_wait4() breakage
kernel_wait4() expects a userland address for status - it's only rusage that goes as a kernel one (and needs a copyout afterwards)
Fixes "osf_wait4: switch to kernel_wait4()"
Cc [email protected] # v4.12+
Signed-off-by Al Viro <[email protected]>
---
arch/alpha/kernel/osf_sys.c +1 -4
@@ -1180,13 +1180,10 @@ SYSCALL_DEFINE2(osf_getrusage, int, who, struct rusage32 __user *, ru) SYSCALL_DEFINE4(osf_wait4, pid_t, pid, int __user *, ustatus, int, options, struct rusage32 __user *, ur) { -unsigned int status =0 ;struct rusage r; -long err =kernel_wait4 (pid, &status, options, &r); +long err =kernel_wait4 (pid, ustatus, options, &r);if (err <=0 )return err; -if (put_user (status, ustatus)) -return -EFAULT ;if (!ur)return err;if (put_tv_to_tv32 (&ur->ru_utime, &r.ru_utime))
Linus Torvalds
AppliedApplied.
Just a note:
Quoted 2 lines · Al Viro
Fixes "osf_wait4: switch to kernel_wait4()"
Please put the actual commit ID there too, because that's what people with automation check.
Quoted 1 line
Cc [email protected] # v4.12+
.. and when you do that, you'll see that it wasn't actually in 4.12, but got merged during the 4.13 merge window:
$ git name-rev 92ebce5ac55d
92ebce5ac55d tags/v4.13-rc1~154^2(unless it was backported, but I don't think it was).
Also, the prototype for kernel_wait4() (in <linux/sched/task.h>) is wrong, and doesn't have the __user annotation.
Linus