aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-10-20 21:49:33 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-11-28 21:53:37 -0500
commitda3d4c5fa56236dd924d77ffc4f982356816b93b (patch)
tree37cbc90820ef0e5474801db00c968e2da7c455aa /fs
parentd03d26e58fde2ec99478e26aab47b55755189b08 (diff)
get rid of pt_regs argument of do_execve()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/exec.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/fs/exec.c b/fs/exec.c
index f86b6cc2d6cc..5797ed07efd3 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1566,12 +1566,11 @@ out_ret:
1566 1566
1567int do_execve(const char *filename, 1567int do_execve(const char *filename,
1568 const char __user *const __user *__argv, 1568 const char __user *const __user *__argv,
1569 const char __user *const __user *__envp, 1569 const char __user *const __user *__envp)
1570 struct pt_regs *regs)
1571{ 1570{
1572 struct user_arg_ptr argv = { .ptr.native = __argv }; 1571 struct user_arg_ptr argv = { .ptr.native = __argv };
1573 struct user_arg_ptr envp = { .ptr.native = __envp }; 1572 struct user_arg_ptr envp = { .ptr.native = __envp };
1574 return do_execve_common(filename, argv, envp, regs); 1573 return do_execve_common(filename, argv, envp, current_pt_regs());
1575} 1574}
1576 1575
1577#ifdef CONFIG_COMPAT 1576#ifdef CONFIG_COMPAT
@@ -1668,7 +1667,7 @@ SYSCALL_DEFINE3(execve,
1668 struct filename *path = getname(filename); 1667 struct filename *path = getname(filename);
1669 int error = PTR_ERR(path); 1668 int error = PTR_ERR(path);
1670 if (!IS_ERR(path)) { 1669 if (!IS_ERR(path)) {
1671 error = do_execve(path->name, argv, envp, current_pt_regs()); 1670 error = do_execve(path->name, argv, envp);
1672 putname(path); 1671 putname(path);
1673 } 1672 }
1674 return error; 1673 return error;
@@ -1694,12 +1693,9 @@ int kernel_execve(const char *filename,
1694 const char *const argv[], 1693 const char *const argv[],
1695 const char *const envp[]) 1694 const char *const envp[])
1696{ 1695{
1697 struct pt_regs *p = current_pt_regs(); 1696 int ret = do_execve(filename,
1698 int ret;
1699
1700 ret = do_execve(filename,
1701 (const char __user *const __user *)argv, 1697 (const char __user *const __user *)argv,
1702 (const char __user *const __user *)envp, p); 1698 (const char __user *const __user *)envp);
1703 if (ret < 0) 1699 if (ret < 0)
1704 return ret; 1700 return ret;
1705 1701
@@ -1707,6 +1703,6 @@ int kernel_execve(const char *filename,
1707 * We were successful. We won't be returning to our caller, but 1703 * We were successful. We won't be returning to our caller, but
1708 * instead to user space by manipulating the kernel stack. 1704 * instead to user space by manipulating the kernel stack.
1709 */ 1705 */
1710 ret_from_kernel_execve(p); 1706 ret_from_kernel_execve(current_pt_regs());
1711} 1707}
1712#endif 1708#endif