lkml.org 
[lkml]   [2022]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kthread: Make it clear that create_kthread() might be terminated by any fatal signal
On Thu 2022-03-10 12:14:28, Eric W. Biederman wrote:
> Petr Mladek <pmladek@suse.com> writes:
>
> > The comments in kernel/kthread.c create a feeling that only SIGKILL
> > is able to break create_kthread().
> ^^^^^^^^^^^^^^^^ __kthread_create_on_node
>
> Signals can't affect create_kthread in any was as it is only called by
> kthreadd. It is __kthread_create_on_node which gets interrupted by
> fatal signals.

Great catch! I wanted to use the public API. I missed that
create_kthread() is used by the "kthreadd" side.

Heh, there actually is "kthread_create()" macro that substitutes
kthread_create_on_node().


> > In reality, wait_for_completion_killable() might be killed by any
> > fatal signal that does not have a custom handler:
> >
> > Update the comments in kernel/kthread.c to make this more obvious.
>
> Except for the minor nit in the change description.
> Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>

Thanks.

I am going to send v2 next week to give time more potential
reviewers.

Best Regards,
Petr

\
 
 \ /
  Last update: 2022-03-11 13:13    [W:0.046 / U:1.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site