]> git.baikalelectronics.ru Git - kernel.git/commit
fork: Explicity test for idle tasks in copy_thread
authorEric W. Biederman <ebiederm@xmission.com>
Mon, 11 Apr 2022 21:17:28 +0000 (16:17 -0500)
committerEric W. Biederman <ebiederm@xmission.com>
Sat, 7 May 2022 14:01:59 +0000 (09:01 -0500)
commit4f0499d9f9c59af43f9885785130a8b62bb9d4a9
treef4c38b8a981df1a2f7fd4681c6cc4f6859893f0f
parentf1ce788a89576161d35c0236636dd5e73d3640e8
fork: Explicity test for idle tasks in copy_thread

The architectures ia64 and parisc have special handling for the idle
thread in copy_process.  Add a flag named idle to kernel_clone_args
and use it to explicity test if an idle process is being created.

Fullfill the expectations of the rest of the copy_thread
implemetations and pass a function pointer in .stack from fork_idle().
This makes what is happening in copy_thread better defined, and is
useful to make idle threads less special.

Link: https://lkml.kernel.org/r/20220506141512.516114-3-ebiederm@xmission.com
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
arch/ia64/kernel/process.c
arch/parisc/kernel/process.c
include/linux/sched/task.h
kernel/fork.c