diff options
author | Arnd Bergmann <arnd@arndb.de> | 2009-06-27 15:05:30 +0200 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2009-06-27 15:09:52 +0200 |
commit | a1f8213b9518d0e9124a48a34bdd58b4bc2650e5 (patch) | |
tree | 07de0c44f8e30fb6da6458b6026c3114740ea9bc /arch/score/kernel/ptrace.c | |
parent | 9fb24cc50045ec8d13d0a6c3d4d454750b466d61 (diff) | |
download | kernel_samsung_tuna-a1f8213b9518d0e9124a48a34bdd58b4bc2650e5.zip kernel_samsung_tuna-a1f8213b9518d0e9124a48a34bdd58b4bc2650e5.tar.gz kernel_samsung_tuna-a1f8213b9518d0e9124a48a34bdd58b4bc2650e5.tar.bz2 |
score: add address space annotations
Annotate the address space for pointers that are used
correctly with __user and __iomem, so that sparse
can better warn about incorrect casts.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/score/kernel/ptrace.c')
-rw-r--r-- | arch/score/kernel/ptrace.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/score/kernel/ptrace.c b/arch/score/kernel/ptrace.c index 19911e3..1db876b 100644 --- a/arch/score/kernel/ptrace.c +++ b/arch/score/kernel/ptrace.c @@ -267,6 +267,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data) { int ret; + unsigned long __user *datap = (void __user *)data; switch (request) { /* Read the word at location addr in the USER area. */ @@ -316,7 +317,7 @@ arch_ptrace(struct task_struct *child, long request, long addr, long data) return -EIO; } - ret = put_user(tmp, (unsigned long *) data); + ret = put_user(tmp, (unsigned int __user *) datap); return ret; } @@ -355,11 +356,11 @@ arch_ptrace(struct task_struct *child, long request, long addr, long data) } case PTRACE_GETREGS: - ret = ptrace_getregs(child, (void __user *)data); + ret = ptrace_getregs(child, (void __user *)datap); break; case PTRACE_SETREGS: - ret = ptrace_setregs(child, (void __user *)data); + ret = ptrace_setregs(child, (void __user *)datap); break; default: |