diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-12-14 12:44:11 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-12-19 18:07:38 -0500 |
commit | ae903caae267154de7cf8576b130ff474630596b (patch) | |
tree | a39d238d7fd1742f7f20cacbd24a4d1b4957176e /kernel | |
parent | 468366138850f20543f1d4878028900672b23dae (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 'kernel')
-rw-r--r-- | kernel/fork.c | 2 | ||||
-rw-r--r-- | kernel/kmod.c | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 540730783433..389712ffc0ad 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1623,7 +1623,6 @@ long do_fork(unsigned long clone_flags, | |||
1623 | return nr; | 1623 | return nr; |
1624 | } | 1624 | } |
1625 | 1625 | ||
1626 | #ifdef CONFIG_GENERIC_KERNEL_THREAD | ||
1627 | /* | 1626 | /* |
1628 | * Create a kernel thread. | 1627 | * Create a kernel thread. |
1629 | */ | 1628 | */ |
@@ -1632,7 +1631,6 @@ pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags) | |||
1632 | return do_fork(flags|CLONE_VM|CLONE_UNTRACED, (unsigned long)fn, | 1631 | return do_fork(flags|CLONE_VM|CLONE_UNTRACED, (unsigned long)fn, |
1633 | (unsigned long)arg, NULL, NULL); | 1632 | (unsigned long)arg, NULL, NULL); |
1634 | } | 1633 | } |
1635 | #endif | ||
1636 | 1634 | ||
1637 | #ifdef __ARCH_WANT_SYS_FORK | 1635 | #ifdef __ARCH_WANT_SYS_FORK |
1638 | SYSCALL_DEFINE0(fork) | 1636 | SYSCALL_DEFINE0(fork) |
diff --git a/kernel/kmod.c b/kernel/kmod.c index 1c317e386831..0023a87e8de6 100644 --- a/kernel/kmod.c +++ b/kernel/kmod.c | |||
@@ -219,9 +219,9 @@ static int ____call_usermodehelper(void *data) | |||
219 | 219 | ||
220 | commit_creds(new); | 220 | commit_creds(new); |
221 | 221 | ||
222 | retval = kernel_execve(sub_info->path, | 222 | retval = do_execve(sub_info->path, |
223 | (const char *const *)sub_info->argv, | 223 | (const char __user *const __user *)sub_info->argv, |
224 | (const char *const *)sub_info->envp); | 224 | (const char __user *const __user *)sub_info->envp); |
225 | if (!retval) | 225 | if (!retval) |
226 | return 0; | 226 | return 0; |
227 | 227 | ||