Just call do_execveat instead. Signed-off-by: Christoph Hellwig <hch@xxxxxx> --- fs/exec.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/fs/exec.c b/fs/exec.c index 18594f11c31fe1..b63fb020909075 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -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, -- 2.30.1