lkml.org 
[lkml]   [2018]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH] 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: 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))
    \
     
     \ /
      Last update: 2018-07-22 16:07    [W:3.113 / U:1.120 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site