================================ WARNING: inconsistent lock state 5.13.0-syzkaller #0 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. syz-executor799/491 [HC0[0]:SC0[0]:HE1:SE1] takes: ffff88802a3560a0 (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline] ffff88802a3560a0 (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}-{2:2}, at: sco_conn_del+0x134/0x2b0 net/bluetooth/sco.c:176 {IN-SOFTIRQ-W} state was registered at: lock_acquire kernel/locking/lockdep.c:5625 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5590 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:354 [inline] sco_sock_timeout+0x33/0x1b0 net/bluetooth/sco.c:83 call_timer_fn+0x1a5/0x6b0 kernel/time/timer.c:1431 expire_timers kernel/time/timer.c:1476 [inline] __run_timers.part.0+0x675/0xa50 kernel/time/timer.c:1745 __run_timers kernel/time/timer.c:1726 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1758 __do_softirq+0x29b/0x9bd kernel/softirq.c:558 invoke_softirq kernel/softirq.c:432 [inline] __irq_exit_rcu+0x16e/0x1c0 kernel/softirq.c:636 irq_exit_rcu+0x5/0x20 kernel/softirq.c:648 sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1100 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638 mm_update_next_owner+0x4a5/0x7a0 kernel/exit.c:390 exit_mm kernel/exit.c:500 [inline] do_exit+0xada/0x2a50 kernel/exit.c:812 do_group_exit+0x125/0x310 kernel/exit.c:922 __do_sys_exit_group kernel/exit.c:933 [inline] __se_sys_exit_group kernel/exit.c:931 [inline] __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:931 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae irq event stamp: 5260835 hardirqs last enabled at (5260835): [] raw_spin_rq_unlock_irq kernel/sched/sched.h:1319 [inline] hardirqs last enabled at (5260835): [] finish_lock_switch kernel/sched/core.c:4437 [inline] hardirqs last enabled at (5260835): [] finish_task_switch.isra.0+0x232/0xa50 kernel/sched/core.c:4555 hardirqs last disabled at (5260834): [] __schedule+0x1343/0x2710 kernel/sched/core.c:5836 softirqs last enabled at (5258310): [] fpu__clear+0xd3/0x220 arch/x86/kernel/fpu/core.c:379 softirqs last disabled at (5258308): [] fpu__clear+0x2a/0x220 arch/x86/kernel/fpu/core.c:364 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(slock-AF_BLUETOOTH-BTPROTO_SCO); lock(slock-AF_BLUETOOTH-BTPROTO_SCO); *** DEADLOCK *** 3 locks held by syz-executor799/491: #0: ffff8880351f8ff0 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close+0xb7/0x1130 net/bluetooth/hci_core.c:1728 #1: ffff8880351f8078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_do_close+0x22e/0x1130 net/bluetooth/hci_core.c:1765 #2: ffffffff8dacbd08 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_disconn_cfm include/net/bluetooth/hci_core.h:1497 [inline] #2: ffffffff8dacbd08 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0xda/0x260 net/bluetooth/hci_conn.c:1608 stack backtrace: CPU: 0 PID: 491 Comm: syz-executor799 Not tainted 5.13.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:96 print_usage_bug kernel/locking/lockdep.c:203 [inline] valid_state kernel/locking/lockdep.c:3933 [inline] mark_lock_irq kernel/locking/lockdep.c:4136 [inline] mark_lock.cold+0x61/0x8e kernel/locking/lockdep.c:4593 mark_usage kernel/locking/lockdep.c:4506 [inline] __lock_acquire+0x88f/0x54a0 kernel/locking/lockdep.c:4969 lock_acquire kernel/locking/lockdep.c:5625 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5590 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:354 [inline] sco_conn_del+0x134/0x2b0 net/bluetooth/sco.c:176 sco_disconn_cfm+0x71/0xb0 net/bluetooth/sco.c:1189 hci_disconn_cfm include/net/bluetooth/hci_core.h:1500 [inline] hci_conn_hash_flush+0x127/0x260 net/bluetooth/hci_conn.c:1608 hci_dev_do_close+0x528/0x1130 net/bluetooth/hci_core.c:1778 hci_unregister_dev+0x263/0x1130 net/bluetooth/hci_core.c:4019 vhci_release+0x70/0xe0 drivers/bluetooth/hci_vhci.c:340 __fput+0x288/0x920 fs/file_table.c:280 task_work_run+0xdd/0x1a0 kernel/task_work.c:164 exit_task_work include/linux/task_work.h:32 [inline] do_exit+0xbd4/0x2a50 kernel/exit.c:825 do_group_exit+0x125/0x310 kernel/exit.c:922 get_signal+0x47f/0x2150 kernel/signal.c:2796 arch_do_signal_or_restart+0x2a9/0x1eb0 arch/x86/kernel/signal.c:789 handle_signal_work kernel/entry/common.c:148 [inline] exit_to_user_mode_loop kernel/entry/common.c:172 [inline] exit_to_user_mode_prepare+0x17d/0x290 kernel/entry/common.c:209 irqentry_exit_to_user_mode+0x5/0x40 kernel/entry/common.c:315 exc_page_fault+0xc6/0x180 arch/x86/mm/fault.c:1534 asm_exc_page_fault+0x1e/0x30 arch/x86/include/asm/idtentry.h:568 RIP: 0033:0x403040 Code: Unable to access opcode bytes at RIP 0x403016. RSP: 002b:00007f9a3cd65c78 EFLAGS: 00000202 RAX: 0000000000000000 RBX: 0000000000022000 RCX: ffffffffffffffbc RDX: 00007f9a3cd65c80 RSI: 00007f9a3cd65db0 RDI: 000000000000000b RBP: 0000000000412c2a R08: 00000000004d04c0 R09: 00000000004d04c0 R10: 00007f9a3cd661e0 R11: 0000000000000246 R12: 00007ffce44ee2cf R13: 00007f9a3cd66300 R14: 00007f9a3cd66300 R15: 0000000000022000