lkml.org 
[lkml]   [2022]   [Jan]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 09/10] kthread: Ensure struct kthread is present for all kthreads
On Wed, Dec 08, 2021 at 02:25:31PM -0600, Eric W. Biederman wrote:
> Today the rules are a bit iffy and arbitrary about which kernel
> threads have struct kthread present. Both idle threads and thread
> started with create_kthread want struct kthread present so that is
> effectively all kernel threads. Make the rule that if PF_KTHREAD
> and the task is running then struct kthread is present.
>
> This will allow the kernel thread code to using tsk->exit_code
> with different semantics from ordinary processes.

Getting rid of ->exit_code abuse is independent from this.
I'm not saying that this change is a bad idea, but it's an
independent thing. Simply turn these two failure exits
into do_exit(0) in 06/10 and that's it. Then this one
would get rid of if (!self) and the second of those two
calls, but it won't be nailed to that point of queue.

\
 
 \ /
  Last update: 2022-01-07 05:00    [W:0.615 / U:1.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site