From: Hajime Tazaki <thehajime@gmail.com>
To: johannes@sipsolutions.net
Cc: linux-um@lists.infradead.org, johannes.berg@intel.com
Subject: Re: [PATCH] um: fix shutdown __inittext access
Date: Mon, 28 Sep 2026 17:11:36 +0900 [thread overview]
Message-ID: <m233ut4wxz.wl-thehajime@gmail.com> (raw)
In-Reply-To: <20260928093934.ca7af44c59ca.I470ece16d176ea704aa6e5767b755055d106da35@changeid>
On Mon, 28 Sep 2026 16:39:35 +0900,
Johannes Berg wrote:
>
> From: Johannes Berg <johannes.berg@intel.com>
>
> Since first moving __init text into the right place in commit
> 8966ed0b2d48 ("um: move init text between __init_begin/end")
> and then making all init sections inaccessible, shutdown and
> reboot crash instead of working correctly, for the obvious
> reason that the functions are __init but run on the way out.
>
> Removing the __init markers would work in some way, but that
> would bubble through a lot of functions.
>
> Instead, mark the relevant functions __noreturn (including
> longjmp() since that's now needed so start_idle_thread() can
> be __noreturn), and split out the part of main() that's done
> on the way out into a new os_exit() function that's called
> directly.
>
> Reported-by: Hajime Tazaki <thehajime@gmail.com>
> Closes: https://lore.kernel.org/linux-um/m24ifc4v6m.wl-thehajime@gmail.com/
> Fixes: a418ab8fddea ("um: mprotect() __init memory")
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
thanks, separating the exit path from __init code is much nicer.
Tested-by: Hajime Tazaki <thehajime@gmail.com>
-- Hajime
prev parent reply other threads:[~2026-09-28 8:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 7:39 [PATCH] um: fix shutdown __inittext access Johannes Berg
2026-09-28 8:11 ` Hajime Tazaki [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=m233ut4wxz.wl-thehajime@gmail.com \
--to=thehajime@gmail.com \
--cc=johannes.berg@intel.com \
--cc=johannes@sipsolutions.net \
--cc=linux-um@lists.infradead.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 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.