]> git.baikalelectronics.ru Git - kernel.git/commit
fork: Explicitly set PF_KTHREAD
authorEric W. Biederman <ebiederm@xmission.com>
Mon, 11 Apr 2022 19:13:56 +0000 (14:13 -0500)
committerEric W. Biederman <ebiederm@xmission.com>
Sat, 7 May 2022 14:01:59 +0000 (09:01 -0500)
commit5fdb8c053e9d3bc49907e385584e7a7b344ef48d
tree57908b5c1c0a3f4979d06e683b362ccb1907f582
parent144140f5c57ebb8707e11eb5acb3f30e3298eb9d
fork: Explicitly set PF_KTHREAD

Instead of implicitly inheriting PF_KTHREAD from the parent process
examine arguments in kernel_clone_args to see if PF_KTHREAD should be
set.  This makes knowledge of which new threads are kernel threads
explicit.

This also makes it so that init and the user mode helper processes
no longer have PF_KTHREAD set.

Link: https://lkml.kernel.org/r/20220506141512.516114-6-ebiederm@xmission.com
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
kernel/fork.c