@@ -1978,15 +1978,6 @@ int kernel_execve(const char *kernel_filename,
return retval;
}
-static int do_execve(struct filename *filename,
- const char __user *const __user *__argv,
- const char __user *const __user *__envp)
-{
- struct user_arg_ptr argv = { .ptr.native = __argv };
- struct user_arg_ptr envp = { .ptr.native = __envp };
- return do_execveat_common(AT_FDCWD, filename, argv, envp, 0);
-}
-
static int do_execveat(int fd, struct filename *filename,
const char __user *const __user *__argv,
const char __user *const __user *__envp,
@@ -2060,7 +2051,7 @@ SYSCALL_DEFINE3(execve,
const char __user *const __user *, argv,
const char __user *const __user *, envp)
{
- return do_execve(getname(filename), argv, envp);
+ return do_execveat(AT_FDCWD, getname(filename), argv, envp, 0);
}
SYSCALL_DEFINE5(execveat,
Just call do_execveat instead. Signed-off-by: Christoph Hellwig <hch@lst.de> --- fs/exec.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-)