From: Sasha Levin <sashal@kernel.org>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Len Brown <lenb@kernel.org>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
syzbot+cea7285bc17b76ffe39f@syzkaller.appspotmail.com,
syzbot+a265816368571f78ab88@syzkaller.appspotmail.com,
syzkaller-bugs@googlegroups.com, Sasha Levin <sashal@kernel.org>
Subject: [PATCH v2 0/2] ACPI: scan: Do not hold physical_node_lock across device_offline() and device_online()
Date: Wed, 28 Oct 2026 23:45:05 -0400 [thread overview]
Message-ID: <20261029034507.2721580-1-sashal@kernel.org> (raw)
syzbot has reported a lockdep cycle between physical_node_lock and the
CPU hotplug locks, which comes from acpi_bus_offline() holding the ACPI
device's physical_node_lock while it offlines a CPU. Patch 2 stops
holding physical_node_lock across device_offline() and device_online().
Patch 1 is new in v2. It makes acpi_bus_offline() print the
"Offline failed." message itself, while the device cannot go away,
instead of passing the device to acpi_scan_try_to_offline() for
printing after the lock has been released.
Changes since v1:
- New patch 1 (Rafael).
- Patch 2: keep physical_node_lock held across put_device() and leave
the loop with break (Rafael).
- Patch 2: move the comments of the helpers next to their loops
(Rafael).
- Patch 2: the changelog no longer claims that physical_node_lock only
protects the list of physical nodes.
Tested in a QEMU q35 guest with lockdep: the reproducer no longer
triggers the report, CPU and DIMM hot-removal through QMP and sysfs
eject work, and when a DIMM cannot be removed because one of its memory
blocks fails to go offline, the other blocks are put back online and
"memory memory32: Offline failed." is printed, as before.
v1: https://lore.kernel.org/r/20261028161600.1524682-1-sashal@kernel.org
Sasha Levin (2):
ACPI: scan: Print the offline failure message in acpi_bus_offline()
ACPI: scan: Do not hold physical_node_lock across device_offline() and
device_online()
drivers/acpi/scan.c | 108 ++++++++++++++++++++++++++++++++--------
include/acpi/acpi_bus.h | 1 +
2 files changed, 89 insertions(+), 20 deletions(-)
--
2.53.0
next reply other threads:[~2026-10-29 3:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-29 3:45 Sasha Levin [this message]
2026-10-29 3:45 ` [PATCH v2 1/2] ACPI: scan: Print the offline failure message in acpi_bus_offline() Sasha Levin
2026-10-29 3:45 ` [PATCH v2 2/2] ACPI: scan: Do not hold physical_node_lock across device_offline() and device_online() Sasha Levin
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=20261029034507.2721580-1-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=syzbot+a265816368571f78ab88@syzkaller.appspotmail.com \
--cc=syzbot+cea7285bc17b76ffe39f@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.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 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.