summaryrefslogtreecommitdiff
path: root/kernel/usermode_driver.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2020-06-26 01:40:40 +0300
committerEric W. Biederman <ebiederm@xmission.com>2020-07-07 19:58:59 +0300
commit8c2f52663973e643c617663d826e2b0daa008b38 (patch)
tree21b301428622983383cb6d1b866223e0c4fbedfe /kernel/usermode_driver.c
parente80eb1dc868bc1ed93602389d54b27f170ca770c (diff)
downloadlinux-8c2f52663973e643c617663d826e2b0daa008b38.tar.xz
umd: Remove exit_umh
The bpfilter code no longer uses the umd_info.cleanup callback. This callback is what exit_umh exists to call. So remove exit_umh and all of it's associated booking. v1: https://lkml.kernel.org/r/87bll6dlte.fsf_-_@x220.int.ebiederm.org v2: https://lkml.kernel.org/r/87y2o53abg.fsf_-_@x220.int.ebiederm.org Link: https://lkml.kernel.org/r/20200702164140.4468-15-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>
Diffstat (limited to 'kernel/usermode_driver.c')
-rw-r--r--kernel/usermode_driver.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/kernel/usermode_driver.c b/kernel/usermode_driver.c
index f77f8d7ce9e3..cd136f86f799 100644
--- a/kernel/usermode_driver.c
+++ b/kernel/usermode_driver.c
@@ -9,9 +9,6 @@
#include <linux/task_work.h>
#include <linux/usermode_driver.h>
-static LIST_HEAD(umh_list);
-static DEFINE_MUTEX(umh_list_lock);
-
static struct vfsmount *blob_to_mnt(const void *data, size_t len, const char *name)
{
struct file_system_type *type;
@@ -134,7 +131,6 @@ static int umd_setup(struct subprocess_info *info, struct cred *new)
umd_info->pipe_to_umh = to_umh[1];
umd_info->pipe_from_umh = from_umh[0];
umd_info->tgid = get_pid(task_tgid(current));
- current->flags |= PF_UMH;
return 0;
}
@@ -182,11 +178,6 @@ int fork_usermode_driver(struct umd_info *info)
goto out;
err = call_usermodehelper_exec(sub_info, UMH_WAIT_EXEC);
- if (!err) {
- mutex_lock(&umh_list_lock);
- list_add(&info->list, &umh_list);
- mutex_unlock(&umh_list_lock);
- }
out:
if (argv)
argv_free(argv);
@@ -194,23 +185,4 @@ out:
}
EXPORT_SYMBOL_GPL(fork_usermode_driver);
-void __exit_umh(struct task_struct *tsk)
-{
- struct umd_info *info;
- struct pid *tgid = task_tgid(tsk);
-
- mutex_lock(&umh_list_lock);
- list_for_each_entry(info, &umh_list, list) {
- if (info->tgid == tgid) {
- list_del(&info->list);
- mutex_unlock(&umh_list_lock);
- goto out;
- }
- }
- mutex_unlock(&umh_list_lock);
- return;
-out:
- if (info->cleanup)
- info->cleanup(info);
-}