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/sys_score.c | |
parent | 9fb24cc50045ec8d13d0a6c3d4d454750b466d61 (diff) |
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/sys_score.c')
-rw-r--r-- | arch/score/kernel/sys_score.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/score/kernel/sys_score.c b/arch/score/kernel/sys_score.c index eb4d2d3b97ad..16ace29935bb 100644 --- a/arch/score/kernel/sys_score.c +++ b/arch/score/kernel/sys_score.c @@ -87,18 +87,19 @@ int score_clone(struct pt_regs *regs) * sys_execve() executes a new program. * This is called indirectly via a small wrapper */ -int score_execve(struct pt_regs *regs) +asmlinkage long +score_execve(struct pt_regs *regs) { int error; char *filename; - filename = getname((char *) (long) regs->regs[4]); + filename = getname((char __user*)regs->regs[4]); error = PTR_ERR(filename); if (IS_ERR(filename)) return error; - error = do_execve(filename, (char **) (long) regs->regs[5], - (char **) (long) regs->regs[6], regs); + error = do_execve(filename, (char __user *__user*)regs->regs[5], + (char __user *__user *) regs->regs[6], regs); putname(filename); return error; |