[PATCH v2 0/2] ACPI: scan: Do not hold physical_node_lock across device_offline() and device_online()
From: Sasha Levin
Date: Wed Oct 28 2026 - 23:46:53 EST
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@xxxxxxxxxx
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