Clear the PF_USER_WORKER bit of new tasks, instead of inheriting it from the parent. This allows PF_USER_WORKER tasks to fork regular tasks. Signed-off-by: Gabriel Krisman Bertazi <krisman@xxxxxxx> --- kernel/fork.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/fork.c b/kernel/fork.c index 1450b461d196..56baa320a720 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -2228,6 +2228,8 @@ __latent_entropy struct task_struct *copy_process( p->flags &= ~PF_KTHREAD; if (args->kthread) p->flags |= PF_KTHREAD; + + p->flags &= ~PF_USER_WORKER; if (args->user_worker) { /* * Mark us a user worker, and block any signal that isn't -- 2.47.0