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/[email protected] v2: https://lkml.kernel.org/r/[email protected] Link: https://lkml.kernel.org/r/[email protected] Reviewed-by: Greg Kroah-Hartman <[email protected]> Acked-by: Alexei Starovoitov <[email protected]> Tested-by: Alexei Starovoitov <[email protected]> Signed-off-by: "Eric W. Biederman" <[email protected]>
1 parent e2dc9bf commit 55e6074

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

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)