ODEBUG: object ffffc900005278c0 is on stack ffffc90000520000, but NOT annotated.
======================================================
WARNING: possible circular locking dependency detected
syzkaller #0 Not tainted
------------------------------------------------------
kworker/u4:2/31 is trying to acquire lock:
ffffffff8e54c700 (console_owner){....}-{0:0}, at: rcu_try_lock_acquire include/linux/rcupdate.h:336 [inline]
ffffffff8e54c700 (console_owner){....}-{0:0}, at: srcu_read_lock_nmisafe include/linux/srcu.h:409 [inline]
ffffffff8e54c700 (console_owner){....}-{0:0}, at: console_srcu_read_lock kernel/printk/printk.c:289 [inline]
ffffffff8e54c700 (console_owner){....}-{0:0}, at: console_flush_one_record kernel/printk/printk.c:3192 [inline]
ffffffff8e54c700 (console_owner){....}-{0:0}, at: console_flush_all+0x123/0xb20 kernel/printk/printk.c:3289
but task is already holding lock:
ffffffff9a29ded0 (&obj_hash[i].lock){-.-.}-{2:2}, at: debug_object_activate+0x83/0x580 lib/debugobjects.c:818
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+0x40/0x60 kernel/locking/spinlock.c:162
debug_object_activate+0x83/0x580 lib/debugobjects.c:818
debug_work_activate kernel/workqueue.c:664 [inline]
insert_work+0x35/0x330 kernel/workqueue.c:2177
__queue_work+0xccf/0xf90 kernel/workqueue.c:2335
queue_work_on+0x106/0x1d0 kernel/workqueue.c:2386
queue_work include/linux/workqueue.h:669 [inline]
start_poll_synchronize_rcu_expedited+0xfc/0x140 kernel/rcu/tree_exp.h:1033
rcu_init+0x142/0x1c0 kernel/rcu/tree.c:4909
start_kernel+0x189/0x3d0 init/main.c:1099
x86_64_start_reservations+0x24/0x30 arch/x86/kernel/head64.c:310
x86_64_start_kernel+0x143/0x1c0 arch/x86/kernel/head64.c:291
common_startup_64+0x13e/0x147
-> #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+0x7ea/0xf90 kernel/workqueue.c:-1
queue_work_on+0x106/0x1d0 kernel/workqueue.c:2386
queue_work include/linux/workqueue.h:669 [inline]
rpm_suspend+0xe85/0x1700 drivers/base/power/runtime.c:688
__pm_runtime_idle+0x12f/0x1a0 drivers/base/power/runtime.c:1129
pm_runtime_put include/linux/pm_runtime.h:563 [inline]
__device_attach+0x34f/0x450 drivers/base/dd.c:1051
device_initial_probe+0xa1/0xd0 drivers/base/dd.c:1088
bus_probe_device+0x12a/0x220 drivers/base/bus.c:574
device_add+0x7b6/0xb70 drivers/base/core.c:3689
serial_base_port_add+0x18f/0x260 drivers/tty/serial/serial_base_bus.c:186
serial_core_port_device_add drivers/tty/serial/serial_core.c:3258 [inline]
serial_core_register_port+0x375/0x28b0 drivers/tty/serial/serial_core.c:3297
serial8250_register_8250_port+0x1658/0x1fd0 drivers/tty/serial/8250/8250_core.c:822
serial_pnp_probe+0x568/0x7f0 drivers/tty/serial/8250/8250_pnp.c:480
pnp_device_probe+0x30b/0x4c0 drivers/pnp/driver.c:111
call_driver_probe drivers/base/dd.c:-1 [inline]
really_probe+0x267/0xaf0 drivers/base/dd.c:661
__driver_probe_device+0x18c/0x320 drivers/base/dd.c:803
driver_probe_device+0x4f/0x240 drivers/base/dd.c:833
__driver_attach+0x349/0x640 drivers/base/dd.c:1227
bus_for_each_dev+0x23b/0x2c0 drivers/base/bus.c:383
bus_add_driver+0x345/0x670 drivers/base/bus.c:715
driver_register+0x23a/0x320 drivers/base/driver.c:249
serial8250_init+0x8f/0x160 drivers/tty/serial/8250/8250_platform.c:317
do_one_initcall+0x250/0x840 init/main.c:1378
do_initcall_level+0x104/0x190 init/main.c:1440
do_initcalls+0x59/0xa0 init/main.c:1456
kernel_init_freeable+0x2a6/0x3d0 init/main.c:1688
kernel_init+0x1d/0x1d0 init/main.c:1578
ret_from_fork+0x51b/0xa40 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
-> #2 (&dev->power.lock){-...}-{3:3}:
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x40/0x60 kernel/locking/spinlock.c:162
__pm_runtime_resume+0x10f/0x180 drivers/base/power/runtime.c:1196
pm_runtime_get include/linux/pm_runtime.h:494 [inline]
__uart_start+0x171/0x460 drivers/tty/serial/serial_core.c:149
uart_write+0x265/0xa10 drivers/tty/serial/serial_core.c:633
process_output_block drivers/tty/n_tty.c:557 [inline]
n_tty_write+0xd84/0x12a0 drivers/tty/n_tty.c:2366
iterate_tty_write drivers/tty/tty_io.c:1006 [inline]
file_tty_write+0x559/0xa20 drivers/tty/tty_io.c:1081
new_sync_write fs/read_write.c:593 [inline]
vfs_write+0x61d/0xb90 fs/read_write.c:686
ksys_write+0x150/0x270 fs/read_write.c:738
do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline]
do_syscall_64+0xe2/0xf80 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+0x40/0x60 kernel/locking/spinlock.c:162
uart_port_lock_irqsave include/linux/serial_core.h:717 [inline]
serial8250_console_write+0x150/0x1ba0 drivers/tty/serial/8250/8250_port.c:3301
console_emit_next_record kernel/printk/printk.c:3129 [inline]
console_flush_one_record kernel/printk/printk.c:3215 [inline]
console_flush_all+0x718/0xb20 kernel/printk/printk.c:3289
__console_flush_and_unlock kernel/printk/printk.c:3319 [inline]
console_unlock+0xd1/0x1c0 kernel/printk/printk.c:3359
vprintk_emit+0x485/0x560 kernel/printk/printk.c:2426
_printk+0xdd/0x130 kernel/printk/printk.c:2451
register_console+0xbc2/0xfa0 kernel/printk/printk.c:4170
univ8250_console_init+0x3a/0x70 drivers/tty/serial/8250/8250_core.c:515
console_init+0xfc/0x3e0 kernel/printk/printk.c:4369
start_kernel+0x226/0x3d0 init/main.c:1143
x86_64_start_reservations+0x24/0x30 arch/x86/kernel/head64.c:310
x86_64_start_kernel+0x143/0x1c0 arch/x86/kernel/head64.c:291
common_startup_64+0x13e/0x147
-> #0 (console_owner){....}-{0:0}:
check_prev_add kernel/locking/lockdep.c:3165 [inline]
check_prevs_add kernel/locking/lockdep.c:3284 [inline]
validate_chain kernel/locking/lockdep.c:3908 [inline]
__lock_acquire+0x15a5/0x2cf0 kernel/locking/lockdep.c:5237
lock_acquire+0x106/0x330 kernel/locking/lockdep.c:5868
console_lock_spinning_enable kernel/printk/printk.c:1900 [inline]
console_emit_next_record kernel/printk/printk.c:3123 [inline]
console_flush_one_record kernel/printk/printk.c:3215 [inline]
console_flush_all+0x6c1/0xb20 kernel/printk/printk.c:3289
__console_flush_and_unlock kernel/printk/printk.c:3319 [inline]
console_unlock+0xd1/0x1c0 kernel/printk/printk.c:3359
vprintk_emit+0x485/0x560 kernel/printk/printk.c:2426
_printk+0xdd/0x130 kernel/printk/printk.c:2451
debug_object_is_on_stack lib/debugobjects.c:-1 [inline]
lookup_object_or_alloc lib/debugobjects.c:688 [inline]
debug_object_activate+0x42f/0x580 lib/debugobjects.c:820
debug_rcu_head_queue kernel/rcu/rcu.h:236 [inline]
__call_srcu kernel/rcu/srcutree.c:1458 [inline]
__synchronize_srcu+0x2d3/0x3e0 kernel/rcu/srcutree.c:1517
fsnotify_mark_destroy_workfn+0x109/0x300 fs/notify/mark.c:996
process_one_work kernel/workqueue.c:3257 [inline]
process_scheduled_works+0xaec/0x17a0 kernel/workqueue.c:3340
worker_thread+0xda6/0x1360 kernel/workqueue.c:3421
kthread+0x726/0x8b0 kernel/kthread.c:463
ret_from_fork+0x51b/0xa40 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
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 ***
5 locks held by kworker/u4:2/31:
#0: ffff88801a879948 ((wq_completion)events_unbound#2){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3232 [inline]
#0: ffff88801a879948 ((wq_completion)events_unbound#2){+.+.}-{0:0}, at: process_scheduled_works+0x9d4/0x17a0 kernel/workqueue.c:3340
#1: ffffc90000527bc0 ((reaper_work).work){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3233 [inline]
#1: ffffc90000527bc0 ((reaper_work).work){+.+.}-{0:0}, at: process_scheduled_works+0xa0f/0x17a0 kernel/workqueue.c:3340
#2: ffffffff9a29ded0 (&obj_hash[i].lock){-.-.}-{2:2}, at: debug_object_activate+0x83/0x580 lib/debugobjects.c:818
#3: ffffffff8e54c760 (console_lock){+.+.}-{0:0}, at: _printk+0xdd/0x130 kernel/printk/printk.c:2451
#4: ffffffff8e434018 (console_srcu){....}-{0:0}, at: rcu_try_lock_acquire include/linux/rcupdate.h:336 [inline]
#4: ffffffff8e434018 (console_srcu){....}-{0:0}, at: srcu_read_lock_nmisafe include/linux/srcu.h:409 [inline]
#4: ffffffff8e434018 (console_srcu){....}-{0:0}, at: console_srcu_read_lock kernel/printk/printk.c:289 [inline]
#4: ffffffff8e434018 (console_srcu){....}-{0:0}, at: console_flush_one_record kernel/printk/printk.c:3192 [inline]
#4: ffffffff8e434018 (console_srcu){....}-{0:0}, at: console_flush_all+0x123/0xb20 kernel/printk/printk.c:3289
stack backtrace:
CPU: 0 UID: 0 PID: 31 Comm: kworker/u4:2 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Workqueue: events_unbound fsnotify_mark_destroy_workfn
Call Trace:
dump_stack_lvl+0xe8/0x150 lib/dump_stack.c:120
print_circular_bug+0x2e1/0x300 kernel/locking/lockdep.c:2043
check_noncircular+0x12e/0x150 kernel/locking/lockdep.c:2175
check_prev_add kernel/locking/lockdep.c:3165 [inline]
check_prevs_add kernel/locking/lockdep.c:3284 [inline]
validate_chain kernel/locking/lockdep.c:3908 [inline]
__lock_acquire+0x15a5/0x2cf0 kernel/locking/lockdep.c:5237
lock_acquire+0x106/0x330 kernel/locking/lockdep.c:5868
console_lock_spinning_enable kernel/printk/printk.c:1900 [inline]
console_emit_next_record kernel/printk/printk.c:3123 [inline]
console_flush_one_record kernel/printk/printk.c:3215 [inline]
console_flush_all+0x6c1/0xb20 kernel/printk/printk.c:3289
__console_flush_and_unlock kernel/printk/printk.c:3319 [inline]
console_unlock+0xd1/0x1c0 kernel/printk/printk.c:3359
vprintk_emit+0x485/0x560 kernel/printk/printk.c:2426
_printk+0xdd/0x130 kernel/printk/printk.c:2451
debug_object_is_on_stack lib/debugobjects.c:-1 [inline]
lookup_object_or_alloc lib/debugobjects.c:688 [inline]
debug_object_activate+0x42f/0x580 lib/debugobjects.c:820
debug_rcu_head_queue kernel/rcu/rcu.h:236 [inline]
__call_srcu kernel/rcu/srcutree.c:1458 [inline]
__synchronize_srcu+0x2d3/0x3e0 kernel/rcu/srcutree.c:1517
fsnotify_mark_destroy_workfn+0x109/0x300 fs/notify/mark.c:996
process_one_work kernel/workqueue.c:3257 [inline]
process_scheduled_works+0xaec/0x17a0 kernel/workqueue.c:3340
worker_thread+0xda6/0x1360 kernel/workqueue.c:3421
kthread+0x726/0x8b0 kernel/kthread.c:463
ret_from_fork+0x51b/0xa40 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246
------------[ cut here ]------------
1
WARNING: lib/debugobjects.c:655 at debug_object_is_on_stack lib/debugobjects.c:655 [inline], CPU#0: kworker/u4:2/31
WARNING: lib/debugobjects.c:655 at lookup_object_or_alloc lib/debugobjects.c:688 [inline], CPU#0: kworker/u4:2/31
WARNING: lib/debugobjects.c:655 at debug_object_activate+0x430/0x580 lib/debugobjects.c:820, CPU#0: kworker/u4:2/31
Modules linked in:
CPU: 0 UID: 0 PID: 31 Comm: kworker/u4:2 Not tainted syzkaller #0 PREEMPT(full)
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
Workqueue: events_unbound fsnotify_mark_destroy_workfn
RIP: 0010:debug_object_is_on_stack lib/debugobjects.c:655 [inline]
RIP: 0010:lookup_object_or_alloc lib/debugobjects.c:688 [inline]
RIP: 0010:debug_object_activate+0x430/0x580 lib/debugobjects.c:820
Code: c4 28 5b 41 5c 41 5d 41 5e 41 5f 5d c3 cc cc cc cc cc ff c5 89 2d d0 d2 86 15 48 c7 c7 00 59 07 8c 48 89 de e8 c1 53 7b fc 90 <0f> 0b 90 49 81 fd 00 f0 ff ff 0f 86 a4 fd ff ff c7 44 24 04 00 00
RSP: 0018:ffffc90000527820 EFLAGS: 00010046
RAX: 0000000000000050 RBX: ffffc900005278c0 RCX: 91864fb4bb397900
RDX: 0000000000000000 RSI: 0000000080000001 RDI: 0000000000000000
RBP: 0000000000000001 R08: 0000000000000003 R09: 0000000000000004
R10: dffffc0000000000 R11: fffffbfff1c7ce48 R12: ffff8880304f24e0
R13: ffff88801188ad58 R14: dffffc0000000000 R15: ffffffff8badfc40
FS: 0000000000000000(0000) GS:ffff88808ccea000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffdcd646f24 CR3: 000000001247a000 CR4: 0000000000352ef0
Call Trace:
debug_rcu_head_queue kernel/rcu/rcu.h:236 [inline]
__call_srcu kernel/rcu/srcutree.c:1458 [inline]
__synchronize_srcu+0x2d3/0x3e0 kernel/rcu/srcutree.c:1517
fsnotify_mark_destroy_workfn+0x109/0x300 fs/notify/mark.c:996
process_one_work kernel/workqueue.c:3257 [inline]
process_scheduled_works+0xaec/0x17a0 kernel/workqueue.c:3340
worker_thread+0xda6/0x1360 kernel/workqueue.c:3421
kthread+0x726/0x8b0 kernel/kthread.c:463
ret_from_fork+0x51b/0xa40 arch/x86/kernel/process.c:158
ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:246