From: Petr Mladek <pmladek@suse.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Peter Zijlstra <peterz@infradead.org>,
Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>,
Kees Cook <keescook@chromium.org>, Marco Elver <elver@google.com>,
Jens Axboe <axboe@kernel.dk>,
Thomas Gleixner <tglx@linutronix.de>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kthread: Make it clear that create_kthread() might be terminated by any fatal signal
Date: Fri, 11 Mar 2022 13:12:16 +0100 [thread overview]
Message-ID: <Yis8oPagDlPNQM0y@alley> (raw)
In-Reply-To: <871qz9brp7.fsf@email.froward.int.ebiederm.org>
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
prev parent reply other threads:[~2022-03-11 12:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-10 9:34 Petr Mladek
2022-03-10 18:14 ` Eric W. Biederman
2022-03-11 12:12 ` Petr Mladek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yis8oPagDlPNQM0y@alley \
--to=pmladek@suse.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=ebiederm@xmission.com \
--cc=elver@google.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@polymtl.ca \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®