================================ WARNING: inconsistent lock state 4.19.155-syzkaller #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-fuzzer/8136 [HC0[0]:SC1[1]:HE1:SE0] takes: 000000004d5e5857 (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}, at: spin_lock include/linux/spinlock.h:329 [inline] 000000004d5e5857 (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}, at: sco_sock_timeout+0x31/0x210 net/bluetooth/sco.c:82 {SOFTIRQ-ON-W} state was registered at: __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:329 [inline] sco_conn_del+0xe2/0x240 net/bluetooth/sco.c:175 sco_disconn_cfm+0x74/0xb0 net/bluetooth/sco.c:1133 hci_disconn_cfm include/net/bluetooth/hci_core.h:1261 [inline] hci_conn_hash_flush+0x127/0x260 net/bluetooth/hci_conn.c:1512 hci_dev_do_close+0x659/0xf10 net/bluetooth/hci_core.c:1666 hci_unregister_dev+0x18b/0x910 net/bluetooth/hci_core.c:3271 vhci_release+0x70/0xe0 drivers/bluetooth/hci_vhci.c:354 __fput+0x2ce/0x890 fs/file_table.c:278 task_work_run+0x148/0x1c0 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0xbb2/0x2b70 kernel/exit.c:887 do_group_exit+0x125/0x310 kernel/exit.c:990 get_signal+0x3f2/0x1f70 kernel/signal.c:2588 do_signal+0x8f/0x1670 arch/x86/kernel/signal.c:821 exit_to_usermode_loop+0x204/0x2a0 arch/x86/entry/common.c:163 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x538/0x620 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe irq event stamp: 6434468 hardirqs last enabled at (6434468): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:168 [inline] hardirqs last enabled at (6434468): [] _raw_spin_unlock_irq+0x24/0x80 kernel/locking/spinlock.c:192 hardirqs last disabled at (6434467): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline] hardirqs last disabled at (6434467): [] _raw_spin_lock_irq+0x35/0x80 kernel/locking/spinlock.c:160 softirqs last enabled at (6434382): [] __do_softirq+0x69a/0x9a0 kernel/softirq.c:318 softirqs last disabled at (6434461): [] invoke_softirq kernel/softirq.c:372 [inline] softirqs last disabled at (6434461): [] irq_exit+0x215/0x260 kernel/softirq.c:412 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 *** 1 lock held by syz-fuzzer/8136: #0: 00000000b95409b1 ((&sk->sk_timer)#3){+.-.}, at: lockdep_copy_map include/linux/lockdep.h:168 [inline] #0: 00000000b95409b1 ((&sk->sk_timer)#3){+.-.}, at: call_timer_fn+0xc9/0x700 kernel/time/timer.c:1328 stack backtrace: CPU: 1 PID: 8136 Comm: syz-fuzzer Not tainted 4.19.155-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fc/0x2fe lib/dump_stack.c:118 print_usage_bug.cold+0x42e/0x570 kernel/locking/lockdep.c:2544 valid_state kernel/locking/lockdep.c:2557 [inline] mark_lock_irq kernel/locking/lockdep.c:2751 [inline] mark_lock+0xc70/0x1160 kernel/locking/lockdep.c:3131 mark_irqflags kernel/locking/lockdep.c:3009 [inline] __lock_acquire+0xdc4/0x3ff0 kernel/locking/lockdep.c:3372 lock_acquire+0x170/0x3c0 kernel/locking/lockdep.c:3907 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:144 spin_lock include/linux/spinlock.h:329 [inline] sco_sock_timeout+0x31/0x210 net/bluetooth/sco.c:82 call_timer_fn+0x177/0x700 kernel/time/timer.c:1338 expire_timers+0x243/0x4e0 kernel/time/timer.c:1375 __run_timers kernel/time/timer.c:1703 [inline] run_timer_softirq+0x21c/0x670 kernel/time/timer.c:1716 __do_softirq+0x26c/0x9a0 kernel/softirq.c:292 invoke_softirq kernel/softirq.c:372 [inline] irq_exit+0x215/0x260 kernel/softirq.c:412 exiting_irq arch/x86/include/asm/apic.h:544 [inline] smp_apic_timer_interrupt+0x136/0x550 arch/x86/kernel/apic/apic.c:1094 apic_timer_interrupt+0xf/0x20 arch/x86/entry/entry_64.S:894 RIP: 0033:0x7764f6 Code: 8b 08 48 8b 50 08 48 89 0c 24 48 89 54 24 08 48 8b 8c 24 10 01 00 00 48 89 4c 24 10 e8 73 fe ff ff 48 8b 44 24 78 48 8b 48 08 <48> 8b 50 10 48 8b 5c 24 18 48 8b 74 24 20 48 8b 7c 24 40 48 39 d7 RSP: 002b:000000c02f616de8 EFLAGS: 00000212 ORIG_RAX: ffffffffffffff13 RAX: 000000c01e808fa0 RBX: 0000000000000028 RCX: 000000c01e556c60 RDX: 0000000000000000 RSI: 000000c008ba89f0 RDI: 000000c01e81f920 RBP: 000000c02f616ed8 R08: 0000000000000001 R09: 000000c01e81f920 R10: 0000000000000028 R11: 000000c000030b58 R12: 0000000000000000 R13: 000000c000030b48 R14: 0000000000aff71f R15: 0000000000000000