diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2022-04-11 16:17:28 -0500 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2022-05-07 09:01:59 -0500 |
commit | 36cb0e1cda645ee645b85a6ce652cb46a16e14e5 (patch) | |
tree | f4c38b8a981df1a2f7fd4681c6cc4f6859893f0f /arch/parisc | |
parent | c5febea0956fd3874e8fb59c6f84d68f128d68f8 (diff) | |
download | linux-stable-36cb0e1cda645ee645b85a6ce652cb46a16e14e5.tar.gz linux-stable-36cb0e1cda645ee645b85a6ce652cb46a16e14e5.tar.bz2 linux-stable-36cb0e1cda645ee645b85a6ce652cb46a16e14e5.zip |
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>
Diffstat (limited to 'arch/parisc')
-rw-r--r-- | arch/parisc/kernel/process.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/parisc/kernel/process.c b/arch/parisc/kernel/process.c index 129c17de45ba..30a5874ca845 100644 --- a/arch/parisc/kernel/process.c +++ b/arch/parisc/kernel/process.c @@ -224,7 +224,7 @@ copy_thread(struct task_struct *p, const struct kernel_clone_args *args) if (unlikely(p->flags & (PF_KTHREAD | PF_IO_WORKER))) { /* kernel thread */ memset(cregs, 0, sizeof(struct pt_regs)); - if (!usp) /* idle thread */ + if (args->idle) /* idle thread */ return 0; /* Must exit via ret_from_kernel_thread in order * to call schedule_tail() |