From: Oleg Nesterov <oleg@redhat.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Bradley Morgan <include@grrlz.net>,
akpm@linux-foundation.org, brauner@kernel.org,
peterz@infradead.org, tglx@kernel.org, npiggin@gmail.com,
pasha.tatashin@soleen.com, kees@kernel.org,
stable@vger.kernel.org, linux-kernel@vger.kernel.org,
syzbot+8fdf0d8e10bdde1c2e88@syzkaller.appspotmail.com
Subject: Re: [PATCH] reboot: enable IRQs before do_exit in the halt and power off fallback
Date: Mon, 13 Jul 2026 21:48:43 +0200 [thread overview]
Message-ID: <alVBG8OS4RBCOqDK@redhat.com> (raw)
In-Reply-To: <87tsq3vbtf.fsf@email.froward.int.ebiederm.org>
On 07/12, Eric W. Biederman wrote:
>
> Bradley Morgan <include@grrlz.net> writes:
>
> > The reboot syscall calls do_exit(0) after kernel_halt() or
> > kernel_power_off(). Those are expected to stop the machine and not
> > return. When they do return (no PM info, power off failed), the
> > shutdown path has already disabled interrupts: native_machine_shutdown()
> > calls local_irq_disable() on x86, and do_exit() then hits its
> > WARN_ON(irqs_disabled()) at kernel/exit.c:930.
> >
> > do_exit only warns by design; make_task_dead() is the path that fixes
> > the IRQs disabled state (commit 001c28e57187 ("exit: Detect and fix irq
> > disabled state in oops")). The reboot fallback is not an oops and wants
> > a clean do_exit, so enable IRQs at the two call sites instead, matching
> > the make_task_dead pattern.
>
> I think this is fixing symptoms not the actual cause.
>
> How does kernel_halt or kernel_power_off manage to return?
Agreed... and this was already reported twice at least. See
https://lore.kernel.org/all/20250403-exit-v1-1-8e9266bfc4b7@debian.org/
https://lore.kernel.org/all/20250410143937.1829272-1-Tze-nan.Wu@mediatek.com/
Oleg.
prev parent reply other threads:[~2026-07-13 19:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-12 12:52 [PATCH] reboot: enable IRQs before do_exit in the halt and power off fallback Bradley Morgan
2026-07-13 2:54 ` Eric W. Biederman
2026-07-13 5:57 ` Bradley Morgan
2026-07-13 19:48 ` Oleg Nesterov [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=alVBG8OS4RBCOqDK@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=ebiederm@xmission.com \
--cc=include@grrlz.net \
--cc=kees@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@gmail.com \
--cc=pasha.tatashin@soleen.com \
--cc=peterz@infradead.org \
--cc=stable@vger.kernel.org \
--cc=syzbot+8fdf0d8e10bdde1c2e88@syzkaller.appspotmail.com \
--cc=tglx@kernel.org \
/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