public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Breno Leitao <leitao@debian.org>
Cc: Mateusz Guzik <mjguzik@gmail.com>,
	akpm@linux-foundation.org, brauner@kernel.org,
	linux-kernel@vger.kernel.org, joel.granados@kernel.org,
	kernel-team@meta.com
Subject: Re: [PATCH] exit: skip IRQ disabled warning during power off
Date: Fri, 4 Apr 2025 16:16:24 +0200	[thread overview]
Message-ID: <20250404141623.GD3720@redhat.com> (raw)
In-Reply-To: <Z+/V5AzsSqY9ALqL@gmail.com>

On 04/04, Breno Leitao wrote:
>
> 	[  254.474273] reboot: Power down
> 	[  254.479332] ------------[ cut here ]------------
> 	[  254.479934] WARNING: CPU: 0 PID: 1 at kernel/exit.c:881 do_exit (kernel/exit.c:881)
                                       ^^^^^^
confused... so it seems that the init task does
sys_reboot(LINUX_REBOOT_CMD_POWER_OFF) and exits?

But if the init task exits for any reason it should trigger

	if (unlikely(is_global_init(tsk)))
		panic("Attempted to kill init! exitcode=0x%08x\n"

below?

OK, it can be multi-threaded, but still this look like we have more
problems than just WARN_ON(irqs_disabled()).

> When pid=1 is being killed, then synchronize_group_exit() will be called
> with irq enabled (as shown by the warning above),

Hmm. synchronize_group_exit() is called right after WARN_ON(irqs_disabled())
you observe, WARN_ON() won't enable irqs?

Oleg.


  reply	other threads:[~2025-04-04 14:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-03 18:01 [PATCH] exit: skip IRQ disabled warning during power off Breno Leitao
2025-04-04  5:40 ` Mateusz Guzik
2025-04-04 12:51   ` Breno Leitao
2025-04-04 14:16     ` Oleg Nesterov [this message]
2025-04-04 15:14       ` Breno Leitao
2025-04-04 15:31         ` Oleg Nesterov
2025-05-11  4:43           ` Andrew Morton
2025-04-04 14:20     ` Mateusz Guzik
2025-04-04 15:08       ` Breno Leitao
2025-04-04 15:24       ` Oleg Nesterov

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=20250404141623.GD3720@redhat.com \
    --to=oleg@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=joel.granados@kernel.org \
    --cc=kernel-team@meta.com \
    --cc=leitao@debian.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mjguzik@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox