From: Oleg Nesterov <oleg@redhat.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: qianli zhao <zhaoqianligood@gmail.com>,
christian@brauner.io, axboe@kernel.dk,
Thomas Gleixner <tglx@linutronix.de>,
Peter Collingbourne <pcc@google.com>,
linux-kernel@vger.kernel.org, Qianli Zhao <zhaoqianli@xiaomi.com>
Subject: Re: [PATCH] exit: trigger panic when init process is set to SIGNAL_GROUP_EXIT
Date: Wed, 10 Mar 2021 18:32:37 +0100 [thread overview]
Message-ID: <20210310173236.GB8973@redhat.com> (raw)
In-Reply-To: <m1lfavufep.fsf@fess.ebiederm.org>
On 03/10, Eric W. Biederman wrote:
>
> /* If global init has exited,
> * panic immediately to get a useable coredump.
> */
> if (unlikely(is_global_init(tsk) &&
> (thread_group_empty(tsk) ||
> (tsk->signal->flags & SIGNAL_GROUP_EXIT)))) {
> panic("Attempted to kill init! exitcode=0x%08x\n",
> tsk->signal->group_exit_code ?: (int)code);
> }
>
> The thread_group_empty test is needed to handle single threaded
> inits.
But we can't rely on thread_group_empty(). Just suppose that the main
thread exit first, then the 2nd (last) thread exits too.
Oleg.
next prev parent reply other threads:[~2021-03-10 17:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-09 13:31 [PATCH] exit: trigger panic when init process is set to SIGNAL_GROUP_EXIT Qianli Zhao
2021-03-09 18:26 ` Oleg Nesterov
2021-03-10 3:59 ` qianli zhao
2021-03-10 16:44 ` Eric W. Biederman
2021-03-10 17:32 ` Oleg Nesterov [this message]
2021-03-10 19:07 ` Eric W. Biederman
2021-03-10 22:13 ` Eric W. Biederman
2021-03-11 4:40 ` qianli zhao
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=20210310173236.GB8973@redhat.com \
--to=oleg@redhat.com \
--cc=axboe@kernel.dk \
--cc=christian@brauner.io \
--cc=ebiederm@xmission.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pcc@google.com \
--cc=tglx@linutronix.de \
--cc=zhaoqianli@xiaomi.com \
--cc=zhaoqianligood@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.