summaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2020-06-25 16:48:26 -0500
committerEric W. Biederman <ebiederm@xmission.com>2020-07-04 09:35:56 -0500
commit1c340ead18ee4b4a84357abdef6d4f39ee08328b (patch)
tree412b58dd03cf04a9fd8cc26caae482628a0fbd71 /kernel/fork.c
parent0fe3c63148ef5df1b3cb067e4b4d45d45d0c0fdc (diff)
downloadlinux-1c340ead18ee4b4a84357abdef6d4f39ee08328b.tar.gz
linux-1c340ead18ee4b4a84357abdef6d4f39ee08328b.tar.bz2
linux-1c340ead18ee4b4a84357abdef6d4f39ee08328b.zip
umd: Track user space drivers with struct pid
Use struct pid instead of user space pid values that are prone to wrap araound. In addition track the entire thread group instead of just the first thread that is started by exec. There are no multi-threaded user mode drivers today but there is nothing preclucing user drivers from being multi-threaded, so it is just a good idea to track the entire process. Take a reference count on the tgid's in question to make it possible to remove exit_umh in a future change. As a struct pid is available directly use kill_pid_info. The prior process signalling code was iffy in using a userspace pid known to be in the initial pid namespace and then looking up it's task in whatever the current pid namespace is. It worked only because kernel threads always run in the initial pid namespace. As the tgid is now refcounted verify the tgid is NULL at the start of fork_usermode_driver to avoid the possibility of silent pid leaks. v1: https://lkml.kernel.org/r/87mu4qdlv2.fsf_-_@x220.int.ebiederm.org v2: https://lkml.kernel.org/r/a70l4oy8.fsf_-_@x220.int.ebiederm.org Link: https://lkml.kernel.org/r/20200702164140.4468-12-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/fork.c')
0 files changed, 0 insertions, 0 deletions