program: perf_event_open(&(0x7f0000000200)={0x2, 0x80, 0x7e, 0xd, 0x0, 0x0, 0x0, 0x4, 0x3033a, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0x0, @perf_bp={0x0}, 0x111e8c, 0x0, 0x2, 0x6, 0x3fc, 0x0, 0x4, 0x0, 0x0, 0x0, 0x9}, 0x0, 0xffffffffffffffff, 0xffffffffffffffff, 0x1) r0 = socket$nl_route(0x10, 0x3, 0x0) openat$snapshot(0xffffffffffffff9c, &(0x7f00000000c0), 0x40100, 0x0) sendmsg$nl_route(r0, &(0x7f0000000280)={0x0, 0x0, &(0x7f0000000140)={0x0, 0x40}}, 0x0) [ 84.618524][ T5306] Bluetooth: hci0: command tx timeout [ 85.457309][ T5330] Bluetooth: hci0: Opcode 0x0c1a failed: -4 [ 85.460776][ T5330] Bluetooth: hci0: Opcode 0x0406 failed: -4 [ 85.496238][ T5330] [ 85.497336][ T5330] ====================================================== [ 85.500277][ T5330] WARNING: possible circular locking dependency detected [ 85.503475][ T5330] syzkaller #0 Not tainted [ 85.505377][ T5330] ------------------------------------------------------ [ 85.509698][ T5330] syz.0.0/5330 is trying to acquire lock: [ 85.512354][ T5330] ffff888034c19040 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}, at: __flush_work+0x100/0xc50 [ 85.516906][ T5330] [ 85.516906][ T5330] but task is already holding lock: [ 85.519962][ T5330] ffff888034c192f8 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x7b/0x5c0 [ 85.524271][ T5330] [ 85.524271][ T5330] which lock already depends on the new lock. [ 85.524271][ T5330] [ 85.530043][ T5330] [ 85.530043][ T5330] the existing dependency chain (in reverse order) is: [ 85.534120][ T5330] [ 85.534120][ T5330] -> #1 (&conn->lock#2){+.+.}-{4:4}: [ 85.537606][ T5330] __mutex_lock+0x19f/0x1300 [ 85.539958][ T5330] l2cap_info_timeout+0x60/0xa0 [ 85.542754][ T5330] process_scheduled_works+0xb6e/0x18c0 [ 85.546103][ T5330] worker_thread+0xa53/0xfc0 [ 85.548678][ T5330] kthread+0x388/0x470 [ 85.550617][ T5330] ret_from_fork+0x51e/0xb90 [ 85.552779][ T5330] ret_from_fork_asm+0x1a/0x30 [ 85.555136][ T5330] [ 85.555136][ T5330] -> #0 ((work_completion)(&(&conn->info_timer)->work)){+.+.}-{0:0}: [ 85.560524][ T5330] __lock_acquire+0x15a5/0x2cf0 [ 85.563089][ T5330] lock_acquire+0xf0/0x2e0 [ 85.565056][ T5330] __flush_work+0x700/0xc50 [ 85.566965][ T5330] __cancel_work_sync+0xbe/0x110 [ 85.569290][ T5330] l2cap_conn_del+0x40f/0x5c0 [ 85.571687][ T5330] l2cap_connect_cfm+0x12b/0x1390 [ 85.574322][ T5330] hci_conn_failed+0x1ce/0x340 [ 85.577135][ T5330] hci_abort_conn_sync+0xdd0/0x1190 [ 85.579934][ T5330] hci_disconnect_all_sync+0x1b5/0x350 [ 85.582664][ T5330] hci_suspend_sync+0x417/0xd20 [ 85.585085][ T5330] hci_suspend_dev+0x28d/0x540 [ 85.587524][ T5330] hci_suspend_notifier+0xf2/0x2f0 [ 85.590491][ T5330] notifier_call_chain+0x1be/0x400 [ 85.593358][ T5330] blocking_notifier_call_chain_robust+0x85/0x100 [ 85.596556][ T5330] pm_notifier_call_chain_robust+0x2c/0x60 [ 85.599401][ T5330] snapshot_open+0x19c/0x280 [ 85.601622][ T5330] misc_open+0x2d5/0x350 [ 85.603777][ T5330] chrdev_open+0x4cd/0x5e0 [ 85.606369][ T5330] do_dentry_open+0x785/0x14e0 [ 85.609299][ T5330] vfs_open+0x3b/0x340 [ 85.611968][ T5330] path_openat+0x2e08/0x3860 [ 85.614604][ T5330] do_file_open+0x23e/0x4a0 [ 85.617079][ T5330] do_sys_openat2+0x113/0x200 [ 85.619364][ T5330] __x64_sys_openat+0x138/0x170 [ 85.621364][ T5330] do_syscall_64+0x14d/0xf80 [ 85.623721][ T5330] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 85.626630][ T5330] [ 85.626630][ T5330] other info that might help us debug this: [ 85.626630][ T5330] [ 85.631009][ T5330] Possible unsafe locking scenario: [ 85.631009][ T5330] [ 85.635054][ T5330] CPU0 CPU1 [ 85.637731][ T5330] ---- ---- [ 85.639947][ T5330] lock(&conn->lock#2); [ 85.641936][ T5330] lock((work_completion)(&(&conn->info_timer)->work)); [ 85.646766][ T5330] lock(&conn->lock#2); [ 85.650162][ T5330] lock((work_completion)(&(&conn->info_timer)->work)); [ 85.653475][ T5330] [ 85.653475][ T5330] *** DEADLOCK *** [ 85.653475][ T5330] [ 85.656989][ T5330] 8 locks held by syz.0.0/5330: [ 85.659009][ T5330] #0: ffffffff8f01afa8 (misc_mtx){+.+.}-{4:4}, at: misc_open+0x51/0x350 [ 85.662502][ T5330] #1: ffffffff8e607e28 (system_transition_mutex){+.+.}-{4:4}, at: lock_system_sleep+0x49/0x70 [ 85.667009][ T5330] #2: ffffffff8e62f490 ((pm_chain_head).rwsem){++++}-{4:4}, at: blocking_notifier_call_chain_robust+0x65/0x100 [ 85.673792][ T5330] #3: ffff88801cd68ec0 (&hdev->req_lock){+.+.}-{4:4}, at: hci_suspend_dev+0x285/0x540 [ 85.678448][ T5330] #4: ffff88801cd680c0 (&hdev->lock){+.+.}-{4:4}, at: hci_abort_conn_sync+0xa6f/0x1190 [ 85.682552][ T5330] #5: ffffffff8fd5d4e8 (hci_cb_list_lock){+.+.}-{4:4}, at: hci_conn_failed+0x165/0x340 [ 85.687149][ T5330] #6: ffff888034c192f8 (&conn->lock#2){+.+.}-{4:4}, at: l2cap_conn_del+0x7b/0x5c0 [ 85.691600][ T5330] #7: ffffffff8e75e520 (rcu_read_lock){....}-{1:3}, at: __flush_work+0x100/0xc50 [ 85.696318][ T5330] [ 85.696318][ T5330] stack backtrace: [ 85.698854][ T5330] CPU: 0 UID: 0 PID: 5330 Comm: syz.0.0 Not tainted syzkaller #0 PREEMPT(full) [ 85.698874][ T5330] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 [ 85.698881][ T5330] Call Trace: [ 85.698889][ T5330] [ 85.698918][ T5330] dump_stack_lvl+0xe8/0x150 [ 85.698940][ T5330] print_circular_bug+0x2e1/0x300 [ 85.698958][ T5330] check_noncircular+0x12e/0x150 [ 85.698979][ T5330] __lock_acquire+0x15a5/0x2cf0 [ 85.698994][ T5330] ? do_raw_spin_lock+0x12b/0x2f0 [ 85.699025][ T5330] ? do_raw_spin_unlock+0x4d/0x210 [ 85.699034][ T5330] lock_acquire+0xf0/0x2e0 [ 85.699043][ T5330] ? __flush_work+0x100/0xc50 [ 85.699055][ T5330] ? __flush_work+0x100/0xc50 [ 85.699065][ T5330] __flush_work+0x700/0xc50 [ 85.699080][ T5330] ? __flush_work+0x100/0xc50 [ 85.699093][ T5330] ? __flush_work+0x100/0xc50 [ 85.699108][ T5330] ? __pfx___flush_work+0x10/0x10 [ 85.699122][ T5330] ? __pfx_wq_barrier_func+0x10/0x10 [ 85.699137][ T5330] ? __cancel_work_sync+0x5c/0x110 [ 85.699151][ T5330] __cancel_work_sync+0xbe/0x110 [ 85.699164][ T5330] l2cap_conn_del+0x40f/0x5c0 [ 85.699184][ T5330] l2cap_connect_cfm+0x12b/0x1390 [ 85.699201][ T5330] ? __pfx___mutex_lock+0x10/0x10 [ 85.699218][ T5330] ? __pfx_l2cap_connect_cfm+0x10/0x10 [ 85.699234][ T5330] ? __pfx_l2cap_connect_cfm+0x10/0x10 [ 85.699248][ T5330] hci_conn_failed+0x1ce/0x340 [ 85.699263][ T5330] ? hci_abort_conn_sync+0xa7b/0x1190 [ 85.699276][ T5330] hci_abort_conn_sync+0xdd0/0x1190 [ 85.699285][ T5330] ? __pfx_hci_abort_conn_sync+0x10/0x10 [ 85.699293][ T5330] ? hci_disconnect_all_sync+0x2e/0x350 [ 85.699303][ T5330] ? hci_disconnect_all_sync+0x2e/0x350 [ 85.699311][ T5330] ? hci_disconnect_all_sync+0x2e/0x350 [ 85.699320][ T5330] hci_disconnect_all_sync+0x1b5/0x350 [ 85.699329][ T5330] hci_suspend_sync+0x417/0xd20 [ 85.699339][ T5330] ? __pfx_hci_suspend_sync+0x10/0x10 [ 85.699350][ T5330] ? lockdep_hardirqs_on+0x7a/0x110 [ 85.699360][ T5330] ? enable_work+0x1fd/0x230 [ 85.699374][ T5330] ? hci_cmd_sync_cancel_sync+0xc9/0x1c0 [ 85.699384][ T5330] hci_suspend_dev+0x28d/0x540 [ 85.699396][ T5330] ? __pfx_hci_suspend_dev+0x10/0x10 [ 85.699406][ T5330] ? rcu_barrier+0x474/0x580 [ 85.699423][ T5330] hci_suspend_notifier+0xf2/0x2f0 [ 85.699435][ T5330] notifier_call_chain+0x1be/0x400 [ 85.699453][ T5330] blocking_notifier_call_chain_robust+0x85/0x100 [ 85.699464][ T5330] pm_notifier_call_chain_robust+0x2c/0x60 [ 85.699474][ T5330] snapshot_open+0x19c/0x280 [ 85.699483][ T5330] ? __pfx_snapshot_open+0x10/0x10 [ 85.699491][ T5330] misc_open+0x2d5/0x350 [ 85.699500][ T5330] chrdev_open+0x4cd/0x5e0 [ 85.699509][ T5330] ? __pfx_chrdev_open+0x10/0x10 [ 85.699518][ T5330] ? fsnotify_open_perm_and_set_mode+0x135/0x6d0 [ 85.699537][ T5330] ? __pfx_chrdev_open+0x10/0x10 [ 85.699545][ T5330] do_dentry_open+0x785/0x14e0 [ 85.699562][ T5330] vfs_open+0x3b/0x340 [ 85.699571][ T5330] ? path_openat+0x2df0/0x3860 [ 85.699579][ T5330] path_openat+0x2e08/0x3860 [ 85.699590][ T5330] ? __pfx_stack_trace_save+0x10/0x10 [ 85.699601][ T5330] ? stack_depot_save_flags+0x33/0x810 [ 85.699616][ T5330] ? __pfx_path_openat+0x10/0x10 [ 85.699625][ T5330] ? __x64_sys_openat+0x138/0x170 [ 85.699636][ T5330] ? do_syscall_64+0x14d/0xf80 [ 85.699646][ T5330] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 85.699657][ T5330] ? __lock_acquire+0x6b5/0x2cf0 [ 85.699666][ T5330] do_file_open+0x23e/0x4a0 [ 85.699672][ T5330] ? __pfx_do_file_open+0x10/0x10 [ 85.699695][ T5330] ? _raw_spin_unlock+0x28/0x50 [ 85.699707][ T5330] ? alloc_fd+0x64b/0x6c0 [ 85.699719][ T5330] do_sys_openat2+0x113/0x200 [ 85.699730][ T5330] ? __se_sys_futex+0x3a8/0x450 [ 85.699744][ T5330] ? __pfx_do_sys_openat2+0x10/0x10 [ 85.699756][ T5330] ? rcu_is_watching+0x15/0xb0 [ 85.699771][ T5330] __x64_sys_openat+0x138/0x170 [ 85.699784][ T5330] do_syscall_64+0x14d/0xf80 [ 85.699794][ T5330] ? trace_irq_disable+0x3b/0x150 [ 85.699809][ T5330] ? entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 85.699819][ T5330] ? clear_bhb_loop+0x40/0x90 [ 85.699831][ T5330] entry_SYSCALL_64_after_hwframe+0x77/0x7f [ 85.699845][ T5330] RIP: 0033:0x7f73d1b9c799 [ 85.699858][ T5330] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 e8 ff ff ff f7 d8 64 89 01 48 [ 85.699868][ T5330] RSP: 002b:00007f73d2985fe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000101 [ 85.699881][ T5330] RAX: ffffffffffffffda RBX: 00007f73d1e15fa0 RCX: 00007f73d1b9c799 [ 85.699886][ T5330] RDX: 0000000000040100 RSI: 00002000000000c0 RDI: ffffffffffffff9c [ 85.699890][ T5330] RBP: 00007f73d1c32c99 R08: 0000000000000000 R09: 0000000000000000 [ 85.699894][ T5330] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 [ 85.699898][ T5330] R13: 00007f73d1e16038 R14: 00007f73d1e15fa0 R15: 00007fff492c7668 [ 85.699906][ T5330] [ 86.825568][ T5306] Bluetooth: hci0: command 0x040f tx timeout [ 88.906412][ T5306] Bluetooth: hci0: command 0x040f tx timeout [ 90.985470][ T5306] Bluetooth: hci0: command 0x040f tx timeout