mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2 0/2] ACPI: scan: Do not hold physical_node_lock across device_offline() and device_online()
@ 2026-10-29  3:45 Sasha Levin
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Sasha Levin @ 2026-10-29  3:45 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Len Brown, linux-acpi, linux-kernel, syzbot+cea7285bc17b76ffe39f,
	syzbot+a265816368571f78ab88, syzkaller-bugs, Sasha Levin

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-29  3:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-29  3:45 [PATCH v2 0/2] ACPI: scan: Do not hold physical_node_lock across device_offline() and device_online() Sasha Levin
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®