====================================================== WARNING: possible circular locking dependency detected syzkaller #0 Not tainted ------------------------------------------------------ kworker/3:0/34 is trying to acquire lock: ffff88802dd8e2f8 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_info_timeout+0x79/0xa0 net/bluetooth/l2cap_core.c:1661 but task is already holding lock: ffffc900006dfd08 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: process_one_work+0x93c/0x1920 kernel/workqueue.c:3251 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #1 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: touch_work_lockdep_map kernel/workqueue.c:4005 [inline] start_flush_work kernel/workqueue.c:4259 [inline] __flush_work+0x4de/0xcb0 kernel/workqueue.c:4291 __cancel_work_sync kernel/workqueue.c:4447 [inline] cancel_delayed_work_sync+0xd1/0xf0 kernel/workqueue.c:4521 l2cap_conn_del+0x5d1/0x770 net/bluetooth/l2cap_core.c:1791 l2cap_connect_cfm+0x9bb/0x1050 net/bluetooth/l2cap_core.c:7323 hci_connect_cfm include/net/bluetooth/hci_core.h:2139 [inline] hci_conn_failed+0x188/0x360 net/bluetooth/hci_conn.c:1342 hci_abort_conn_sync+0x7d9/0xb20 net/bluetooth/hci_sync.c:5753 hci_disconnect_all_sync.constprop.0.isra.0+0x155/0x430 net/bluetooth/hci_sync.c:5776 hci_suspend_sync+0x8b7/0xa70 net/bluetooth/hci_sync.c:6252 hci_suspend_dev+0x31d/0x540 net/bluetooth/hci_core.c:2850 hci_suspend_notifier+0x21e/0x330 net/bluetooth/hci_core.c:2421 notifier_call_chain+0x99/0x420 kernel/notifier.c:85 notifier_call_chain_robust kernel/notifier.c:120 [inline] blocking_notifier_call_chain_robust kernel/notifier.c:345 [inline] blocking_notifier_call_chain_robust+0xc8/0x160 kernel/notifier.c:333 pm_notifier_call_chain_robust+0x27/0x60 kernel/power/main.c:172 snapshot_open+0x189/0x2a0 kernel/power/user.c:77 misc_open+0x26d/0x450 drivers/char/misc.c:163 chrdev_open+0x234/0x6a0 fs/char_dev.c:411 do_dentry_open+0x6d8/0x1660 fs/open.c:949 vfs_open+0x82/0x3f0 fs/open.c:1081 do_open fs/namei.c:4671 [inline] path_openat+0x208c/0x31a0 fs/namei.c:4830 do_file_open+0x20e/0x430 fs/namei.c:4859 do_sys_openat2+0x10d/0x1e0 fs/open.c:1366 do_sys_open fs/open.c:1372 [inline] __do_sys_openat fs/open.c:1388 [inline] __se_sys_openat fs/open.c:1383 [inline] __x64_sys_openat+0x12d/0x210 fs/open.c:1383 do_syscall_x64 arch/x86/entry/syscall_64.c:63 [inline] do_syscall_64+0x106/0xf80 arch/x86/entry/syscall_64.c:94 entry_SYSCALL_64_after_hwframe+0x77/0x7f -> #0 (&conn->lock#2){+.+.}-{4:4}: 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+0x14b8/0x2630 kernel/locking/lockdep.c:5237 lock_acquire kernel/locking/lockdep.c:5868 [inline] lock_acquire+0x1cf/0x380 kernel/locking/lockdep.c:5825 __mutex_lock_common kernel/locking/mutex.c:614 [inline] __mutex_lock+0x1a2/0x1b90 kernel/locking/mutex.c:776 l2cap_info_timeout+0x79/0xa0 net/bluetooth/l2cap_core.c:1661 process_one_work+0x9d7/0x1920 kernel/workqueue.c:3275 process_scheduled_works kernel/workqueue.c:3358 [inline] worker_thread+0x5da/0xe40 kernel/workqueue.c:3439 kthread+0x370/0x450 kernel/kthread.c:436 ret_from_fork+0x754/0xd80 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245 other info that might help us debug this: Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock((work_completion)(&(&conn->info_timer)->work)); lock(&conn->lock#2); lock((work_completion)(&(&conn->info_timer)->work)); lock(&conn->lock#2); *** DEADLOCK *** 2 locks held by kworker/3:0/34: #0: ffff88801b8aa948 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x1287/0x1920 kernel/workqueue.c:3250 #1: ffffc900006dfd08 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: process_one_work+0x93c/0x1920 kernel/workqueue.c:3251 stack backtrace: CPU: 3 UID: 0 PID: 34 Comm: kworker/3:0 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 l2cap_info_timeout Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120 print_circular_bug.cold+0x178/0x1c7 kernel/locking/lockdep.c:2043 check_noncircular+0x146/0x160 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+0x14b8/0x2630 kernel/locking/lockdep.c:5237 lock_acquire kernel/locking/lockdep.c:5868 [inline] lock_acquire+0x1cf/0x380 kernel/locking/lockdep.c:5825 __mutex_lock_common kernel/locking/mutex.c:614 [inline] __mutex_lock+0x1a2/0x1b90 kernel/locking/mutex.c:776 l2cap_info_timeout+0x79/0xa0 net/bluetooth/l2cap_core.c:1661 process_one_work+0x9d7/0x1920 kernel/workqueue.c:3275 process_scheduled_works kernel/workqueue.c:3358 [inline] worker_thread+0x5da/0xe40 kernel/workqueue.c:3439 kthread+0x370/0x450 kernel/kthread.c:436 ret_from_fork+0x754/0xd80 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245