From: Bradley Morgan <bradley.morgan@linux.dev>
To: Andrew Morton <akpm@linux-foundation.org>,
"Rafael J . Wysocki" <rafael@kernel.org>
Cc: Dmitry Osipenko <dmitry.osipenko@collabora.com>,
Max Filippov <jcmvbkbc@gmail.com>,
Chris Zankel <chris@zankel.net>, Andrew Davis <afd@ti.com>,
Oleg Nesterov <oleg@redhat.com>, Petr Mladek <pmladek@suse.com>,
linux-kernel@vger.kernel.org,
Bradley Morgan <bradley.morgan@linux.dev>
Subject: [PATCH 0/2] Fix a few snafus in the reboot code
Date: Thu, 26 Nov 2026 21:47:52 +0000 [thread overview]
Message-ID: <20261126214754.3630965-1-bradley.morgan@linux.dev> (raw)
In reboot, i have found a few small snafus which i have fixed,
Patch 1 fixes a small snafu in platform_sys_off_handler,
where **IF** a caller passes NULL for cb_data, a second
SYS_OFF_PRIO_PLATFORM registration thinks that
platform_sys_off_handler is still free, hence, it reuses
the **SAME** struct, then links the same notifier_block
into two lists at once...
Patch 2 also fixes a snafu, where do_kernel_power_off()
registers a pm_power_off quickly, and then ends up
allocating with GFP_KERNEL or calling synchronize_rcu()
with interrupts off and other CPUs stopped.
I am aware these bugs are quite "edge-casey", but better
to fix them now rather then never! :)
Happy Reviewing!
Bradley Morgan (2):
reboot: fix platform sys_off handler reuse with NULL cb_data
reboot: register legacy pm_power_off once at boot
kernel/reboot.c | 83 ++++++++++++++++++++++++++++---------------------
1 file changed, 48 insertions(+), 35 deletions(-)
--
2.53.0
next reply other threads:[~2026-11-26 21:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 21:47 Bradley Morgan [this message]
2026-11-26 21:47 ` [PATCH 1/2] reboot: fix platform sys_off handler reuse with NULL cb_data Bradley Morgan
2026-11-26 21:47 ` [PATCH 2/2] reboot: register legacy pm_power_off once at boot Bradley Morgan
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=20261126214754.3630965-1-bradley.morgan@linux.dev \
--to=bradley.morgan@linux.dev \
--cc=afd@ti.com \
--cc=akpm@linux-foundation.org \
--cc=chris@zankel.net \
--cc=dmitry.osipenko@collabora.com \
--cc=jcmvbkbc@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=pmladek@suse.com \
--cc=rafael@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 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.