lkml.org 
[lkml]   [2012]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 1/7] x86: fix __user annotations in asm/sys_ia32.h
    Date
    Fix the following sparse warning:

    sys_ia32.c:293:38: warning: incorrect type in argument 2 (different address spaces)
    sys_ia32.c:293:38: expected unsigned int [noderef] [usertype] <asn:1>*stat_addr
    sys_ia32.c:293:38: got unsigned int *stat_addr

    Ironically, sys_ia32.h was introduced to fix sparse warnings but missed that
    one.

    Cc: Jaswinder Singh Rajput <jaswinder@infradead.org>
    Signed-off-by: Mathias Krause <minipli@googlemail.com>
    ---
    arch/x86/ia32/sys_ia32.c | 2 +-
    arch/x86/include/asm/sys_ia32.h | 2 +-
    2 files changed, 2 insertions(+), 2 deletions(-)

    diff --git a/arch/x86/ia32/sys_ia32.c b/arch/x86/ia32/sys_ia32.c
    index 4540bec..c5b938d 100644
    --- a/arch/x86/ia32/sys_ia32.c
    +++ b/arch/x86/ia32/sys_ia32.c
    @@ -287,7 +287,7 @@ asmlinkage long sys32_sigaction(int sig, struct old_sigaction32 __user *act,
    return ret;
    }

    -asmlinkage long sys32_waitpid(compat_pid_t pid, unsigned int *stat_addr,
    +asmlinkage long sys32_waitpid(compat_pid_t pid, unsigned int __user *stat_addr,
    int options)
    {
    return compat_sys_wait4(pid, stat_addr, options, NULL);
    diff --git a/arch/x86/include/asm/sys_ia32.h b/arch/x86/include/asm/sys_ia32.h
    index 3fda9db4..4ca1c61 100644
    --- a/arch/x86/include/asm/sys_ia32.h
    +++ b/arch/x86/include/asm/sys_ia32.h
    @@ -40,7 +40,7 @@ asmlinkage long sys32_sigaction(int, struct old_sigaction32 __user *,
    struct old_sigaction32 __user *);
    asmlinkage long sys32_alarm(unsigned int);

    -asmlinkage long sys32_waitpid(compat_pid_t, unsigned int *, int);
    +asmlinkage long sys32_waitpid(compat_pid_t, unsigned int __user *, int);
    asmlinkage long sys32_sysfs(int, u32, u32);

    asmlinkage long sys32_sched_rr_get_interval(compat_pid_t,
    --
    1.7.10.4


    \
     
     \ /
      Last update: 2012-09-03 00:21    [W:2.195 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site