[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240922125458.GA9426@redhat.com>
Date: Sun, 22 Sep 2024 14:54:59 +0200
From: Oleg Nesterov <oleg@...hat.com>
To: "qiwu.chen" <qiwuchen55@...il.com>
Cc: corbet@....net, mhocko@...e.com, jani.nikula@...el.com,
akpm@...ux-foundation.org, brauner@...nel.org, paulmck@...nel.org,
linux-doc@...r.kernel.org, "qiwu.chen" <qiwu.chen@...nssion.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 2/2] exit: dump current pt_regs info on global init
exit
Add lkml.
On 09/22, qiwu.chen wrote:
>
> @@ -847,10 +848,12 @@ void __noreturn do_exit(long code)
> * If the last thread of global init has exited, panic
> * immediately to get a useable coredump.
> */
> - if (unlikely(is_global_init(tsk)))
> + if (unlikely(is_global_init(tsk))) {
> + /* dump the pt_regs of current thread for debugging. */
> + show_regs(task_pt_regs(tsk));
> panic("Attempted to kill init! exitcode=0x%08x\n",
> tsk->signal->group_exit_code ?: (int)code);
Well, this means that show_regs() will be called twice if CONFIG_DEBUG_BUGVERBOSE
at least on x86, see dump_stack() in panic(). See also show_regs_if_on_stack()
in show_trace_log_lvl().
Not good...
Oleg.
Powered by blists - more mailing lists