aboutsummaryrefslogtreecommitdiffstats
path: root/fs/exec.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-12-14 12:44:11 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2012-12-19 18:07:38 -0500
commitae903caae267154de7cf8576b130ff474630596b (patch)
treea39d238d7fd1742f7f20cacbd24a4d1b4957176e /fs/exec.c
parent468366138850f20543f1d4878028900672b23dae (diff)
Bury the conditionals from kernel_thread/kernel_execve series
All architectures have CONFIG_GENERIC_KERNEL_THREAD CONFIG_GENERIC_KERNEL_EXECVE __ARCH_WANT_SYS_EXECVE None of them have __ARCH_WANT_KERNEL_EXECVE and there are only two callers of kernel_execve() (which is a trivial wrapper for do_execve() now) left. Kill the conditionals and make both callers use do_execve(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c21
1 files changed, 0 insertions, 21 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 721a29929511..090ac91da2e9 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1657,7 +1657,6 @@ int get_dumpable(struct mm_struct *mm)
1657 return __get_dumpable(mm->flags); 1657 return __get_dumpable(mm->flags);
1658} 1658}
1659 1659
1660#ifdef __ARCH_WANT_SYS_EXECVE
1661SYSCALL_DEFINE3(execve, 1660SYSCALL_DEFINE3(execve,
1662 const char __user *, filename, 1661 const char __user *, filename,
1663 const char __user *const __user *, argv, 1662 const char __user *const __user *, argv,
@@ -1685,23 +1684,3 @@ asmlinkage long compat_sys_execve(const char __user * filename,
1685 return error; 1684 return error;
1686} 1685}
1687#endif 1686#endif
1688#endif
1689
1690#ifdef __ARCH_WANT_KERNEL_EXECVE
1691int kernel_execve(const char *filename,
1692 const char *const argv[],
1693 const char *const envp[])
1694{
1695 int ret = do_execve(filename,
1696 (const char __user *const __user *)argv,
1697 (const char __user *const __user *)envp);
1698 if (ret < 0)
1699 return ret;
1700
1701 /*
1702 * We were successful. We won't be returning to our caller, but
1703 * instead to user space by manipulating the kernel stack.
1704 */
1705 ret_from_kernel_execve(current_pt_regs());
1706}
1707#endif