diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-05-13 23:52:56 -0400 |
---|---|---|
committer | Paul Mundt <lethal@hera.kernel.org> | 2007-06-07 22:43:36 -0400 |
commit | e08f457c7c0cc7720f28349f8780ea752c063441 (patch) | |
tree | 7b82666f2002d57dc57d022daf90c778265159e9 /arch/sh/kernel/process.c | |
parent | 7a302a9674593259866de4a9d5ae8edc03dc1934 (diff) |
sh: __user annotations for __get/__put_user().
This adds in some more __user annotations. These weren't being
handled properly in some of the __get_user and __put_user paths,
so tidy those up.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/process.c')
-rw-r--r-- | arch/sh/kernel/process.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/sh/kernel/process.c b/arch/sh/kernel/process.c index a11e2aa73cbc..aa9c8112140b 100644 --- a/arch/sh/kernel/process.c +++ b/arch/sh/kernel/process.c | |||
@@ -17,6 +17,7 @@ | |||
17 | #include <linux/kexec.h> | 17 | #include <linux/kexec.h> |
18 | #include <linux/kdebug.h> | 18 | #include <linux/kdebug.h> |
19 | #include <linux/tick.h> | 19 | #include <linux/tick.h> |
20 | #include <linux/reboot.h> | ||
20 | #include <asm/uaccess.h> | 21 | #include <asm/uaccess.h> |
21 | #include <asm/mmu_context.h> | 22 | #include <asm/mmu_context.h> |
22 | #include <asm/pgalloc.h> | 23 | #include <asm/pgalloc.h> |
@@ -449,23 +450,20 @@ asmlinkage int sys_vfork(unsigned long r4, unsigned long r5, | |||
449 | /* | 450 | /* |
450 | * sys_execve() executes a new program. | 451 | * sys_execve() executes a new program. |
451 | */ | 452 | */ |
452 | asmlinkage int sys_execve(char *ufilename, char **uargv, | 453 | asmlinkage int sys_execve(char __user *ufilename, char __user * __user *uargv, |
453 | char **uenvp, unsigned long r7, | 454 | char __user * __user *uenvp, unsigned long r7, |
454 | struct pt_regs __regs) | 455 | struct pt_regs __regs) |
455 | { | 456 | { |
456 | struct pt_regs *regs = RELOC_HIDE(&__regs, 0); | 457 | struct pt_regs *regs = RELOC_HIDE(&__regs, 0); |
457 | int error; | 458 | int error; |
458 | char *filename; | 459 | char *filename; |
459 | 460 | ||
460 | filename = getname((char __user *)ufilename); | 461 | filename = getname(ufilename); |
461 | error = PTR_ERR(filename); | 462 | error = PTR_ERR(filename); |
462 | if (IS_ERR(filename)) | 463 | if (IS_ERR(filename)) |
463 | goto out; | 464 | goto out; |
464 | 465 | ||
465 | error = do_execve(filename, | 466 | error = do_execve(filename, uargv, uenvp, regs); |
466 | (char __user * __user *)uargv, | ||
467 | (char __user * __user *)uenvp, | ||
468 | regs); | ||
469 | if (error == 0) { | 467 | if (error == 0) { |
470 | task_lock(current); | 468 | task_lock(current); |
471 | current->ptrace &= ~PT_DTRACE; | 469 | current->ptrace &= ~PT_DTRACE; |