Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+3 -8
-1
include/linux/umh.h
··· 22 22 const char *path; 23 23 char **argv; 24 24 char **envp; 25 - struct file *file; 26 25 int wait; 27 26 int retval; 28 27 int (*init)(struct subprocess_info *info, struct cred *new);
+3 -7
kernel/umh.c
··· 98 98 99 99 commit_creds(new); 100 100 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); 108 104 out: 109 105 sub_info->retval = retval; 110 106 /*