ODEBUG: object ffffc90003d9fa98 is on stack ffffc90003d98000, but NOT annotated.
------------[ cut here ]------------
======================================================
WARNING: possible circular locking dependency detected
6.15.0-syzkaller-08297-ge0797d3b91de #0 Not tainted
------------------------------------------------------
bch-copygc/loop/9021 is trying to acquire lock:
ffffffff8e2d1bc0 (console_owner){....}-{0:0}, at: console_trylock_spinning kernel/printk/printk.c:2048 [inline]
ffffffff8e2d1bc0 (console_owner){....}-{0:0}, at: vprintk_emit+0x4d4/0x6d0 kernel/printk/printk.c:2449
but task is already holding lock:
ffffffff9ad8d150 (&obj_hash[i].lock){-.-.}-{2:2}, at: __debug_object_init+0xec/0x3d0 lib/debugobjects.c:741
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #4 (&obj_hash[i].lock){-.-.}-{2:2}:
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162
debug_object_activate+0x14c/0x4c0 lib/debugobjects.c:818
debug_work_activate kernel/workqueue.c:664 [inline]
insert_work+0x2e/0x230 kernel/workqueue.c:2180
__queue_work+0x97e/0x10f0 kernel/workqueue.c:2341
queue_work_on+0x15f/0x1f0 kernel/workqueue.c:2392
queue_work include/linux/workqueue.h:662 [inline]
start_poll_synchronize_rcu_expedited+0x113/0x190 kernel/rcu/tree_exp.h:1075
rcu_init+0xe95/0x1630 kernel/rcu/tree.c:4854
start_kernel+0x1df/0x4d0 init/main.c:990
x86_64_start_reservations+0x18/0x30 arch/x86/kernel/head64.c:307
x86_64_start_kernel+0x130/0x190 arch/x86/kernel/head64.c:288
common_startup_64+0x13e/0x148
-> #3 (&pool->lock){-.-.}-{2:2}:
__raw_spin_lock include/linux/spinlock_api_smp.h:133 [inline]
_raw_spin_lock+0x2e/0x40 kernel/locking/spinlock.c:154
__queue_work+0x26b/0x10f0 kernel/workqueue.c:2301
queue_work_on+0x15f/0x1f0 kernel/workqueue.c:2392
queue_work include/linux/workqueue.h:662 [inline]
rpm_suspend+0xeba/0x11d0 drivers/base/power/runtime.c:673
rpm_idle+0x5b4/0x730 drivers/base/power/runtime.c:547
__pm_runtime_idle+0xba/0x1a0 drivers/base/power/runtime.c:1112
pm_runtime_put include/linux/pm_runtime.h:470 [inline]
__device_attach+0x37e/0x4b0 drivers/base/dd.c:1047
bus_probe_device+0x17f/0x1c0 drivers/base/bus.c:537
device_add+0x1148/0x1a70 drivers/base/core.c:3692
serial_base_port_add+0x357/0x4b0 drivers/tty/serial/serial_base_bus.c:179
serial_core_port_device_add drivers/tty/serial/serial_core.c:3342 [inline]
serial_core_register_port+0x13c/0x2560 drivers/tty/serial/serial_core.c:3381
serial8250_register_8250_port+0x1596/0x23b0 drivers/tty/serial/8250/8250_core.c:822
serial_pnp_probe+0x431/0x910 drivers/tty/serial/8250/8250_pnp.c:480
pnp_device_probe+0x2a8/0x4d0 drivers/pnp/driver.c:111
call_driver_probe drivers/base/dd.c:579 [inline]
really_probe+0x241/0xa90 drivers/base/dd.c:657
__driver_probe_device+0x1de/0x440 drivers/base/dd.c:799
driver_probe_device+0x4c/0x1b0 drivers/base/dd.c:829
__driver_attach+0x283/0x580 drivers/base/dd.c:1215
bus_for_each_dev+0x13e/0x1d0 drivers/base/bus.c:370
bus_add_driver+0x2e9/0x690 drivers/base/bus.c:678
driver_register+0x15c/0x4b0 drivers/base/driver.c:249
serial8250_init+0xc9/0x1e0 drivers/tty/serial/8250/8250_platform.c:315
do_one_initcall+0x123/0x6e0 init/main.c:1257
do_initcall_level init/main.c:1319 [inline]
do_initcalls init/main.c:1335 [inline]
do_basic_setup init/main.c:1354 [inline]
kernel_init_freeable+0x5c2/0x900 init/main.c:1567
kernel_init+0x1c/0x2b0 init/main.c:1457
ret_from_fork+0x5d7/0x6f0 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
-> #2 (&dev->power.lock){-...}-{3:3}:
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162
__pm_runtime_resume+0xa9/0x170 drivers/base/power/runtime.c:1179
pm_runtime_get include/linux/pm_runtime.h:418 [inline]
__uart_start+0x1b0/0x4c0 drivers/tty/serial/serial_core.c:148
uart_write+0x218/0xb30 drivers/tty/serial/serial_core.c:635
process_output_block drivers/tty/n_tty.c:561 [inline]
n_tty_write+0x412/0x1160 drivers/tty/n_tty.c:2377
iterate_tty_write drivers/tty/tty_io.c:1015 [inline]
file_tty_write.constprop.0+0x502/0x9b0 drivers/tty/tty_io.c:1090
tty_write drivers/tty/tty_io.c:1111 [inline]
redirected_tty_write drivers/tty/tty_io.c:1134 [inline]
redirected_tty_write+0xd4/0x150 drivers/tty/tty_io.c:1114
new_sync_write fs/read_write.c:593 [inline]
vfs_write+0x6c7/0x1150 fs/read_write.c:686
ksys_write+0x12a/0x250 fs/read_write.c:738
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xcd/0x4c0 arch/x86/entry/syscall_64.c:94
entry_SYSCALL_64_after_hwframe+0x77/0x7f
-> #1 (&port_lock_key){-.-.}-{3:3}:
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162
uart_port_lock_irqsave include/linux/serial_core.h:715 [inline]
serial8250_console_write+0x181/0x1890 drivers/tty/serial/8250/8250_port.c:3415
console_emit_next_record kernel/printk/printk.c:3138 [inline]
console_flush_all+0x801/0xc60 kernel/printk/printk.c:3226
__console_flush_and_unlock kernel/printk/printk.c:3285 [inline]
console_unlock+0xd8/0x210 kernel/printk/printk.c:3325
vprintk_emit+0x418/0x6d0 kernel/printk/printk.c:2450
_printk+0xc7/0x100 kernel/printk/printk.c:2475
register_console+0xc2d/0x11b0 kernel/printk/printk.c:4125
univ8250_console_init+0x5f/0x90 drivers/tty/serial/8250/8250_core.c:513
console_init+0x14f/0x680 kernel/printk/printk.c:4323
start_kernel+0x29f/0x4d0 init/main.c:1034
x86_64_start_reservations+0x18/0x30 arch/x86/kernel/head64.c:307
x86_64_start_kernel+0x130/0x190 arch/x86/kernel/head64.c:288
common_startup_64+0x13e/0x148
-> #0 (console_owner){....}-{0:0}:
check_prev_add kernel/locking/lockdep.c:3168 [inline]
check_prevs_add kernel/locking/lockdep.c:3287 [inline]
validate_chain kernel/locking/lockdep.c:3911 [inline]
__lock_acquire+0x126f/0x1c90 kernel/locking/lockdep.c:5240
lock_acquire kernel/locking/lockdep.c:5871 [inline]
lock_acquire+0x179/0x350 kernel/locking/lockdep.c:5828
console_trylock_spinning kernel/printk/printk.c:2048 [inline]
vprintk_emit+0x4e5/0x6d0 kernel/printk/printk.c:2449
_printk+0xc7/0x100 kernel/printk/printk.c:2475
__report_bug lib/bug.c:191 [inline]
report_bug+0x435/0x580 lib/bug.c:215
handle_bug+0x184/0x210 arch/x86/kernel/traps.c:338
exc_invalid_op+0x17/0x50 arch/x86/kernel/traps.c:392
asm_exc_invalid_op+0x1a/0x20 arch/x86/include/asm/idtentry.h:621
debug_object_is_on_stack lib/debugobjects.c:655 [inline]
lookup_object_or_alloc.part.0+0x2b1/0x590 lib/debugobjects.c:688
lookup_object_or_alloc lib/debugobjects.c:665 [inline]
__debug_object_init+0x2a9/0x3d0 lib/debugobjects.c:743
__init_work+0x4c/0x60 kernel/workqueue.c:677
rhashtable_init_noprof+0x49f/0x7e0 lib/rhashtable.c:1085
bch2_copygc_thread+0xf6/0xdd0 fs/bcachefs/movinggc.c:355
kthread+0x3c5/0x780 kernel/kthread.c:464
ret_from_fork+0x5d7/0x6f0 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
other info that might help us debug this:
Chain exists of:
console_owner --> &pool->lock --> &obj_hash[i].lock
Possible unsafe locking scenario:
CPU0 CPU1
---- ----
lock(&obj_hash[i].lock);
lock(&pool->lock);
lock(&obj_hash[i].lock);
lock(console_owner);
*** DEADLOCK ***
1 lock held by bch-copygc/loop/9021:
#0: ffffffff9ad8d150 (&obj_hash[i].lock){-.-.}-{2:2}, at: __debug_object_init+0xec/0x3d0 lib/debugobjects.c:741
stack backtrace:
CPU: 0 UID: 0 PID: 9021 Comm: bch-copygc/loop Not tainted 6.15.0-syzkaller-08297-ge0797d3b91de #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
Call Trace:
__dump_stack lib/dump_stack.c:94 [inline]
dump_stack_lvl+0x116/0x1f0 lib/dump_stack.c:120
print_circular_bug+0x275/0x350 kernel/locking/lockdep.c:2046
check_noncircular+0x14c/0x170 kernel/locking/lockdep.c:2178
check_prev_add kernel/locking/lockdep.c:3168 [inline]
check_prevs_add kernel/locking/lockdep.c:3287 [inline]
validate_chain kernel/locking/lockdep.c:3911 [inline]
__lock_acquire+0x126f/0x1c90 kernel/locking/lockdep.c:5240
lock_acquire kernel/locking/lockdep.c:5871 [inline]
lock_acquire+0x179/0x350 kernel/locking/lockdep.c:5828
console_trylock_spinning kernel/printk/printk.c:2048 [inline]
vprintk_emit+0x4e5/0x6d0 kernel/printk/printk.c:2449
_printk+0xc7/0x100 kernel/printk/printk.c:2475
__report_bug lib/bug.c:191 [inline]
report_bug+0x435/0x580 lib/bug.c:215
handle_bug+0x184/0x210 arch/x86/kernel/traps.c:338
exc_invalid_op+0x17/0x50 arch/x86/kernel/traps.c:392
asm_exc_invalid_op+0x1a/0x20 arch/x86/include/asm/idtentry.h:621
RIP: 0010:debug_object_is_on_stack lib/debugobjects.c:655 [inline]
RIP: 0010:lookup_object_or_alloc.part.0+0x2b1/0x590 lib/debugobjects.c:688
Code: 0e 48 8d 7d 20 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 58 02 00 00 48 8b 55 20 4c 89 e6 48 c7 c7 80 25 f5 8b e8 d0 7e be fc 90 <0f> 0b 90 48 83 c4 18 48 89 d8 5b 5d 41 5c 41 5d 41 5e 41 5f e9 e1
RSP: 0018:ffffc90003d9f7b0 EFLAGS: 00010086
RAX: 0000000000000050 RBX: ffff888076e262d8 RCX: ffffffff819aa3f9
RDX: 0000000000000000 RSI: ffffffff819b2286 RDI: 0000000000000005
RBP: ffff88802db3da00 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000080000001 R11: 0000000000002be0 R12: ffffc90003d9fa98
R13: ffff88802db3da00 R14: 0000000000000000 R15: 0000000000000000
lookup_object_or_alloc lib/debugobjects.c:665 [inline]
__debug_object_init+0x2a9/0x3d0 lib/debugobjects.c:743
__init_work+0x4c/0x60 kernel/workqueue.c:677
rhashtable_init_noprof+0x49f/0x7e0 lib/rhashtable.c:1085
bch2_copygc_thread+0xf6/0xdd0 fs/bcachefs/movinggc.c:355
kthread+0x3c5/0x780 kernel/kthread.c:464
ret_from_fork+0x5d7/0x6f0 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245
WARNING: CPU: 0 PID: 9021 at lib/debugobjects.c:655 debug_object_is_on_stack lib/debugobjects.c:655 [inline]
WARNING: CPU: 0 PID: 9021 at lib/debugobjects.c:655 lookup_object_or_alloc.part.0+0x2b1/0x590 lib/debugobjects.c:688
Modules linked in:
CPU: 0 UID: 0 PID: 9021 Comm: bch-copygc/loop Not tainted 6.15.0-syzkaller-08297-ge0797d3b91de #0 PREEMPT(full)
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
RIP: 0010:debug_object_is_on_stack lib/debugobjects.c:655 [inline]
RIP: 0010:lookup_object_or_alloc.part.0+0x2b1/0x590 lib/debugobjects.c:688
Code: 0e 48 8d 7d 20 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 58 02 00 00 48 8b 55 20 4c 89 e6 48 c7 c7 80 25 f5 8b e8 d0 7e be fc 90 <0f> 0b 90 48 83 c4 18 48 89 d8 5b 5d 41 5c 41 5d 41 5e 41 5f e9 e1
RSP: 0018:ffffc90003d9f7b0 EFLAGS: 00010086
RAX: 0000000000000050 RBX: ffff888076e262d8 RCX: ffffffff819aa3f9
RDX: 0000000000000000 RSI: ffffffff819b2286 RDI: 0000000000000005
RBP: ffff88802db3da00 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000080000001 R11: 0000000000002be0 R12: ffffc90003d9fa98
R13: ffff88802db3da00 R14: 0000000000000000 R15: 0000000000000000
FS: 0000000000000000(0000) GS:ffff888124976000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000555557f6c6f8 CR3: 00000000340dd000 CR4: 0000000000350ef0
Call Trace:
lookup_object_or_alloc lib/debugobjects.c:665 [inline]
__debug_object_init+0x2a9/0x3d0 lib/debugobjects.c:743
__init_work+0x4c/0x60 kernel/workqueue.c:677
rhashtable_init_noprof+0x49f/0x7e0 lib/rhashtable.c:1085
bch2_copygc_thread+0xf6/0xdd0 fs/bcachefs/movinggc.c:355
kthread+0x3c5/0x780 kernel/kthread.c:464
ret_from_fork+0x5d7/0x6f0 arch/x86/kernel/process.c:148
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245