[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250415-speichel-heften-2eeb4ef264f1@brauner>
Date: Tue, 15 Apr 2025 10:41:13 +0200
From: Christian Brauner <brauner@...nel.org>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Tze-nan Wu (吳澤南) <Tze-nan.Wu@...iatek.com>,
Bobule Chang (張弘義) <bobule.chang@...iatek.com>, "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>, wsd_upstream <wsd_upstream@...iatek.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>, "chenqiwu@...omi.com" <chenqiwu@...omi.com>,
"linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org>, "matthias.bgg@...il.com" <matthias.bgg@...il.com>,
"linux-mediatek@...ts.infradead.org" <linux-mediatek@...ts.infradead.org>
Subject: Re: [RFC PATCH] exit: Skip panic in do_exit() during poweroff
On Mon, Apr 14, 2025 at 06:50:44PM +0200, Oleg Nesterov wrote:
> On 04/14, Tze-nan Wu (吳澤南) wrote:
> >
> > On Thu, 2025-04-10 at 23:05 +0200, Oleg Nesterov wrote:
> > >
> > > As for sys_reboot(), I think that kernel_power_off() must be
> > > __noreturn,
> > > and sys_reboot() should use BUG() after
> > > LINUX_REBOOT_CMD_POWER_OFF/_HALT
> > > instead of do_exit().
> > >
> >
> > Yes, kernel_power_off() should not return, but this is the case only if
> > kernel_power_off() is invoked by PID 1 through sys_reboot().
> > If kernel_power_off() is invoked by a kernel thread (e.g., the thermal
> > kernel module) other than PID 1, then do_exit() could possibly be
> > invoked by PID 1 after kernel_power_off() on another CPU.
>
> Yes sure, this is clear.
>
> I have mentioned sys_reboot() because (unless I am totally confused)
> this connects to the previous report from Breno.
>
> And I agree that we should do stop_other_cpus() first, but let me
> say this again: I can't help ;)
>
> But in any case, rightly or not I still think that the init process
> should not exit/crash due to POWER_OFF/HALT. We should not mask this
> problem in do_exit().
I agree.
Powered by blists - more mailing lists