====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ kworker/u4:6/4290 is trying to acquire lock: ffffffff8cfbd548 (cpu_add_remove_lock){+.+.}-{3:3}, at: cpu_maps_update_begin kernel/cpu.c:289 [inline] ffffffff8cfbd548 (cpu_add_remove_lock){+.+.}-{3:3}, at: cpu_down kernel/cpu.c:1224 [inline] ffffffff8cfbd548 (cpu_add_remove_lock){+.+.}-{3:3}, at: cpu_device_down+0x3a/0xa0 kernel/cpu.c:1242 but task is already holding lock: ffff88801cb80840 (&device->physical_node_lock){+.+.}-{3:3}, at: acpi_bus_offline+0x186/0x400 drivers/acpi/scan.c:151 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #4 (&device->physical_node_lock){+.+.}-{3:3}: __mutex_lock_common+0x1e5/0x2400 kernel/locking/mutex.c:596 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743 acpi_get_first_physical_node drivers/acpi/bus.c:644 [inline] acpi_primary_dev_companion drivers/acpi/bus.c:663 [inline] acpi_companion_match+0x86/0x110 drivers/acpi/bus.c:717 acpi_device_uevent_modalias+0x16/0x30 drivers/acpi/device_sysfs.c:283 platform_uevent+0x38/0xb0 drivers/base/platform.c:1357 dev_uevent+0x3a5/0x740 drivers/base/core.c:2344 kobject_uevent_env+0x465/0x890 lib/kobject_uevent.c:572 kobject_synth_uevent+0x457/0x940 lib/kobject_uevent.c:208 uevent_store+0x22/0x60 drivers/base/core.c:2428 kernfs_fop_write_iter+0x3a8/0x500 fs/kernfs/file.c:296 call_write_iter include/linux/fs.h:2179 [inline] new_sync_write fs/read_write.c:507 [inline] vfs_write+0x748/0xd70 fs/read_write.c:594 ksys_write+0x153/0x260 fs/read_write.c:647 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #3 (kn->active#32){++++}-{0:0}: kernfs_drain fs/kernfs/dir.c:478 [inline] __kernfs_remove+0x5da/0xcb0 fs/kernfs/dir.c:1372 kernfs_remove_by_name_ns+0x91/0x100 fs/kernfs/dir.c:1566 sysfs_remove_file include/linux/sysfs.h:613 [inline] device_remove_file drivers/base/core.c:2796 [inline] device_del+0x62f/0xa80 drivers/base/core.c:3613 device_unregister+0x1c/0xc0 drivers/base/core.c:3660 mce_device_remove arch/x86/kernel/cpu/mce/core.c:2575 [inline] mce_cpu_pre_down+0x33f/0x540 arch/x86/kernel/cpu/mce/core.c:2638 cpuhp_invoke_callback+0x423/0x7e0 kernel/cpu.c:191 cpuhp_thread_fun+0x3b2/0x7f0 kernel/cpu.c:822 smpboot_thread_fn+0x520/0x990 kernel/smpboot.c:164 kthread+0x42e/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 -> #2 (cpuhp_state-down){+.+.}-{0:0}: cpuhp_lock_acquire+0x3a/0x40 kernel/cpu.c:100 cpuhp_kick_ap_work+0x7f/0x1b0 kernel/cpu.c:901 _cpu_down+0x35b/0xbb0 kernel/cpu.c:1170 cpu_down_maps_locked kernel/cpu.c:1217 [inline] cpuhp_smt_disable+0xae/0x1d0 kernel/cpu.c:2261 __store_smt_control kernel/cpu.c:2501 [inline] control_store+0x121/0x150 kernel/cpu.c:2538 kernfs_fop_write_iter+0x3a8/0x500 fs/kernfs/file.c:296 call_write_iter include/linux/fs.h:2179 [inline] new_sync_write fs/read_write.c:507 [inline] vfs_write+0x748/0xd70 fs/read_write.c:594 ksys_write+0x153/0x260 fs/read_write.c:647 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 -> #1 ( cpu_hotplug_lock){++++}-{0:0}: percpu_down_write+0x52/0x2f0 kernel/locking/percpu-rwsem.c:217 cpus_write_lock kernel/cpu.c:327 [inline] _cpu_up+0x77/0x810 kernel/cpu.c:1354 cpu_up+0x16d/0x1a0 kernel/cpu.c:1436 bringup_nonboot_cpus+0x100/0x1a0 kernel/cpu.c:1502 smp_init+0x3a/0x150 kernel/smp.c:1091 kernel_init_freeable+0x3bc/0x560 init/main.c:1581 kernel_init+0x19/0x1b0 init/main.c:1480 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 -> #0 (cpu_add_remove_lock ){+.+.}-{3:3} : check_prev_add kernel/locking/lockdep.c:3120 [inline] check_prevs_add kernel/locking/lockdep.c:3239 [inline] validate_chain kernel/locking/lockdep.c:3855 [inline] __lock_acquire+0x38f7/0x7d40 kernel/locking/lockdep.c:5120 lock_acquire+0x19f/0x400 kernel/locking/lockdep.c:5737 __mutex_lock_common+0x1e5/0x2400 kernel/locking/mutex.c:596 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743 cpu_maps_update_begin kernel/cpu.c:289 [inline] cpu_down kernel/cpu.c:1224 [inline] cpu_device_down+0x3a/0xa0 kernel/cpu.c:1242 device_offline+0x259/0x3a0 drivers/base/core.c:3948 acpi_bus_offline+0x23e/0x400 drivers/acpi/scan.c:163 acpi_scan_try_to_offline drivers/acpi/scan.c:226 [inline] acpi_scan_hot_remove drivers/acpi/scan.c:258 [inline] acpi_generic_hotplug_event drivers/acpi/scan.c:374 [inline] acpi_device_hotplug+0x56c/0xc60 drivers/acpi/scan.c:398 acpi_hotplug_work_fn+0x8f/0xc0 drivers/acpi/osl.c:1160 process_one_work+0x867/0xff0 kernel/workqueue.c:2310 worker_thread+0xad7/0x12a0 kernel/workqueue.c:2457 kthread+0x42e/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 other info that might help us debug this: Chain exists of: cpu_add_remove_lock --> kn->active #32 --> &device->physical_node_lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&device->physical_node_lock); lock(kn->active#32); lock(&device->physical_node_lock); lock(cpu_add_remove_lock); *** DEADLOCK *** 6 locks held by kworker/u4:6/4290: #0: ffff8881447f6938 ((wq_completion)kacpi_hotplug){+.+.}-{0:0}, at: process_one_work+0x75c/0xff0 kernel/workqueue.c:-1 #1: ffffc900030cfd00 ((work_completion)(&hpw->work)){+.+.}-{0:0}, at: process_one_work+0x79e/0xff0 kernel/workqueue.c:2285 #2: ffffffff8d91ffc8 (device_hotplug_lock){+.+.}-{3:3}, at: acpi_device_hotplug+0x8a/0xc60 drivers/acpi/scan.c:384 #3: ffffffff8d7926a8 (acpi_scan_lock){+.+.}-{3:3}, at: acpi_device_hotplug+0x98/0xc60 drivers/acpi/scan.c:385 #4: ffff88801cb80840 (&device->physical_node_lock){+.+.}-{3:3}, at: acpi_bus_offline+0x186/0x400 drivers/acpi/scan.c:151 #5: ffff8880b8f26b20 (&dev->mutex){....}-{3:3}, at: device_lock include/linux/device.h:809 [inline] #5: ffff8880b8f26b20 (&dev->mutex){....}-{3:3}, at: device_offline+0x178/0x3a0 drivers/base/core.c:3943 stack backtrace: CPU: 0 PID: 4290 Comm: kworker/u4:6 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026 Workqueue: kacpi_hotplug acpi_hotplug_work_fn Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 check_noncircular+0x2f8/0x400 kernel/locking/lockdep.c:2178 check_prev_add kernel/locking/lockdep.c:3120 [inline] check_prevs_add kernel/locking/lockdep.c:3239 [inline] validate_chain kernel/locking/lockdep.c:3855 [inline] __lock_acquire+0x38f7/0x7d40 kernel/locking/lockdep.c:5120 lock_acquire+0x19f/0x400 kernel/locking/lockdep.c:5737 __mutex_lock_common+0x1e5/0x2400 kernel/locking/mutex.c:596 __mutex_lock kernel/locking/mutex.c:729 [inline] mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743 cpu_maps_update_begin kernel/cpu.c:289 [inline] cpu_down kernel/cpu.c:1224 [inline] cpu_device_down+0x3a/0xa0 kernel/cpu.c:1242 device_offline+0x259/0x3a0 drivers/base/core.c:3948 acpi_bus_offline+0x23e/0x400 drivers/acpi/scan.c:163 acpi_scan_try_to_offline drivers/acpi/scan.c:226 [inline] acpi_scan_hot_remove drivers/acpi/scan.c:258 [inline] acpi_generic_hotplug_event drivers/acpi/scan.c:374 [inline] acpi_device_hotplug+0x56c/0xc60 drivers/acpi/scan.c:398 acpi_hotplug_work_fn+0x8f/0xc0 drivers/acpi/osl.c:1160 process_one_work+0x867/0xff0 kernel/workqueue.c:2310 worker_thread+0xad7/0x12a0 kernel/workqueue.c:2457 kthread+0x42e/0x520 kernel/kthread.c:334 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287 smpboot: CPU 1 is now offline kernfs physical_package_id: removing kernfs die_id: removing kernfs core_id: removing kernfs core_cpus: removing kernfs core_cpus_list: removing kernfs thread_siblings: removing kernfs thread_siblings_list: removing kernfs core_siblings: removing kernfs core_siblings_list: removing kernfs die_cpus: removing kernfs die_cpus_list: removing kernfs package_cpus: removing kernfs package_cpus_list: removing kernfs topology: removing kobject: 'cpu1' (ffff8880b8f269a8): kobject_uevent_env kobject: 'cpu1' (ffff8880b8f269a8): fill_kobj_path: path = '/devices/system/cpu/cpu1' ACPI: \_SB_.CP01: ACPI: Ejecting kernfs cpu1: removing kernfs driver: removing kernfs thermal_cooling: removing kernfs device: removing kernfs runtime_status: removing kernfs control: removing kernfs runtime_suspended_time: removing kernfs runtime_active_time: removing kernfs autosuspend_delay_ms: removing kernfs power: removing kernfs subsystem: removing kernfs cooling_device1: removing kernfs uevent: removing kernfs type: removing kernfs max_state: removing kernfs cur_state: removing PM: Removing info for No Bus:cooling_device1 kobject: 'cooling_device1' (ffff88801ef6d018): kobject_uevent_env kobject: 'cooling_device1' (ffff88801ef6d018): fill_kobj_path: path = '/devices/virtual/thermal/cooling_device1' kernfs cooling_device1: removing kobject: 'cooling_device1' (ffff88801ef6d018): kobject_cleanup, parent 0000000000000000 kobject: 'cooling_device1' (ffff88801ef6d018): calling ktype release kobject: 'cooling_device1': free name kobject: 'cpu1' (ffff8880b8f269a8): kobject_uevent_env kobject: 'cpu1' (ffff8880b8f269a8): fill_kobj_path: path = '/devices/system/cpu/cpu1' kernfs physical_node: removing kernfs firmware_node: removing kernfs cpu1: removing kernfs node0: removing device: 'cpu1': device_unregister kernfs pm_qos_resume_latency_us: removing kernfs runtime_status: removing kernfs control: removing kernfs runtime_suspended_time: removing kernfs runtime_active_time: removing kernfs autosuspend_delay_ms: removing kernfs power: removing kernfs uevent: removing kernfs online: removing kernfs crash_notes: removing kernfs crash_notes_size: removing kernfs subsystem: removing kernfs cpu1: removing bus: 'cpu': remove device cpu1 PM: Removing info for cpu:cpu1 kobject: 'cpu1' (ffff8880b8f269a8): kobject_uevent_env kobject: 'cpu1' (ffff8880b8f269a8): fill_kobj_path: path = '/devices/system/cpu/cpu1' kernfs cpu1: removing kobject: 'cpu1' (ffff8880b8f269a8): kobject_cleanup, parent 0000000000000000 kobject: 'cpu1' (ffff8880b8f269a8): calling ktype release kobject: 'cpu1': free name ACPI: \_SB_.CP01: ACPI: utils: Return value [15] ACPI: \_SB_.CP01: Eject incomplete - status 0xf