Skip to content

Commit 55e6074

Browse files
committed
umh: Stop calling do_execve_file
With the user mode driver code changed to not set subprocess_info.file there are no more users of subproces_info.file. Remove this field from struct subprocess_info and remove the only user in call_usermodehelper_exec_async that would call do_execve_file instead of do_execve if file was set. v1: https://lkml.kernel.org/r/877dvuf0i7.fsf_-_@x220.int.ebiederm.org v2: https://lkml.kernel.org/r/87r1tx4p2a.fsf_-_@x220.int.ebiederm.org Link: https://lkml.kernel.org/r/20200702164140.4468-9-ebiederm@xmission.com Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Alexei Starovoitov <ast@kernel.org> Tested-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
1 parent e2dc9bf commit 55e6074

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

‎include/linux/umh.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ struct subprocess_info {
2222
const char *path;
2323
char **argv;
2424
char **envp;
25-
struct file *file;
2625
int wait;
2726
int retval;
2827
int (*init)(struct subprocess_info *info, struct cred *new);

‎kernel/umh.c‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,9 @@ static int call_usermodehelper_exec_async(void *data)
9898

9999
commit_creds(new);
100100

101-
if (sub_info->file)
102-
retval = do_execve_file(sub_info->file,
103-
sub_info->argv, sub_info->envp);
104-
else
105-
retval = do_execve(getname_kernel(sub_info->path),
106-
(const char __user *const __user *)sub_info->argv,
107-
(const char __user *const __user *)sub_info->envp);
101+
retval = do_execve(getname_kernel(sub_info->path),
102+
(const char __user *const __user *)sub_info->argv,
103+
(const char __user *const __user *)sub_info->envp);
108104
out:
109105
sub_info->retval = retval;
110106
/*

0 commit comments

Comments
 (0)