* [PATCH] fix osf_wait4() breakage
@ 2018-07-22 14:07 Al Viro
2018-07-22 18:45 ` Linus Torvalds
0 siblings, 1 reply; 2+ messages in thread
From: Al Viro @ 2018-07-22 14:07 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel, Matt Turner, linux-alpha
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: stable@vger.kernel.org # v4.12+
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
diff --git a/arch/alpha/kernel/osf_sys.c b/arch/alpha/kernel/osf_sys.c
index 6e921754c8fc..c210a25dd6da 100644
--- a/arch/alpha/kernel/osf_sys.c
+++ b/arch/alpha/kernel/osf_sys.c
@@ -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))
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] fix osf_wait4() breakage
2018-07-22 14:07 [PATCH] fix osf_wait4() breakage Al Viro
@ 2018-07-22 18:45 ` Linus Torvalds
0 siblings, 0 replies; 2+ messages in thread
From: Linus Torvalds @ 2018-07-22 18:45 UTC (permalink / raw)
To: Al Viro; +Cc: Linux Kernel Mailing List, Matt Turner, linux-alpha
Applied.
Just a note:
On Sun, Jul 22, 2018 at 7:07 AM Al Viro <viro@zeniv.linux.org.uk> wrote:
>
> Fixes: "osf_wait4: switch to kernel_wait4()"
Please put the actual commit ID there too, because that's what people
with automation check.
> Cc: stable@vger.kernel.org # 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-22 18:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-22 14:07 [PATCH] fix osf_wait4() breakage Al Viro
2018-07-22 18:45 ` Linus Torvalds
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox