diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2009-09-22 16:58:42 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-09-22 16:58:43 -0400 |
commit | 3e86a8c617413e344143839c514e9b0c1713065c (patch) | |
tree | d979f64645e47d37b273787faf6bc834550e3963 /arch/s390/kernel/compat_linux.c | |
parent | 2d70ca23f86647e076e3a8b64b3a90e583b894d5 (diff) |
[S390] Convert sys_execve to function with parameters.
Use function parameters instead of accessing the pt_regs structure
to get the parameters.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/compat_linux.c')
-rw-r--r-- | arch/s390/kernel/compat_linux.c | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/arch/s390/kernel/compat_linux.c b/arch/s390/kernel/compat_linux.c index f741cd49111a..05cf446e60b2 100644 --- a/arch/s390/kernel/compat_linux.c +++ b/arch/s390/kernel/compat_linux.c | |||
@@ -443,31 +443,26 @@ sys32_rt_sigqueueinfo(int pid, int sig, compat_siginfo_t __user *uinfo) | |||
443 | * sys32_execve() executes a new program after the asm stub has set | 443 | * sys32_execve() executes a new program after the asm stub has set |
444 | * things up for us. This should basically do what I want it to. | 444 | * things up for us. This should basically do what I want it to. |
445 | */ | 445 | */ |
446 | asmlinkage long sys32_execve(void) | 446 | asmlinkage long sys32_execve(char __user *name, compat_uptr_t __user *argv, |
447 | compat_uptr_t __user *envp) | ||
447 | { | 448 | { |
448 | struct pt_regs *regs = task_pt_regs(current); | 449 | struct pt_regs *regs = task_pt_regs(current); |
449 | char *filename; | 450 | char *filename; |
450 | unsigned long result; | 451 | long rc; |
451 | int rc; | 452 | |
452 | 453 | filename = getname(name); | |
453 | filename = getname(compat_ptr(regs->orig_gpr2)); | 454 | rc = PTR_ERR(filename); |
454 | if (IS_ERR(filename)) { | 455 | if (IS_ERR(filename)) |
455 | result = PTR_ERR(filename); | 456 | return rc; |
456 | goto out; | 457 | rc = compat_do_execve(filename, argv, envp, regs); |
457 | } | 458 | if (rc) |
458 | rc = compat_do_execve(filename, compat_ptr(regs->gprs[3]), | 459 | goto out; |
459 | compat_ptr(regs->gprs[4]), regs); | ||
460 | if (rc) { | ||
461 | result = rc; | ||
462 | goto out_putname; | ||
463 | } | ||
464 | current->thread.fp_regs.fpc=0; | 460 | current->thread.fp_regs.fpc=0; |
465 | asm volatile("sfpc %0,0" : : "d" (0)); | 461 | asm volatile("sfpc %0,0" : : "d" (0)); |
466 | result = regs->gprs[2]; | 462 | rc = regs->gprs[2]; |
467 | out_putname: | ||
468 | putname(filename); | ||
469 | out: | 463 | out: |
470 | return result; | 464 | putname(filename); |
465 | return rc; | ||
471 | } | 466 | } |
472 | 467 | ||
473 | 468 | ||