================================ WARNING: inconsistent lock state 5.12.0-rc5-syzkaller #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. swapper/0/0 [HC0[0]:SC1[1]:HE1:SE0] takes: ffff88807f0f40a0 (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline] ffff88807f0f40a0 (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}-{2:2}, at: sco_sock_timeout+0x33/0x170 net/bluetooth/sco.c:83 {SOFTIRQ-ON-W} state was registered at: lock_acquire+0x126/0x650 kernel/locking/lockdep.c:5510 __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+0x113/0x2a0 net/bluetooth/sco.c:176 hci_disconn_cfm include/net/bluetooth/hci_core.h:1486 [inline] hci_conn_hash_flush+0x112/0x240 net/bluetooth/hci_conn.c:1598 hci_dev_do_close+0xa04/0xfe0 net/bluetooth/hci_core.c:1778 hci_unregister_dev+0x301/0x18a0 net/bluetooth/hci_core.c:3989 vhci_release+0x73/0xc0 drivers/bluetooth/hci_vhci.c:340 __fput+0x352/0x7b0 fs/file_table.c:280 task_work_run+0x146/0x1c0 kernel/task_work.c:140 exit_task_work include/linux/task_work.h:30 [inline] do_exit+0x6b2/0x2290 kernel/exit.c:825 do_group_exit+0x168/0x2d0 kernel/exit.c:922 __do_sys_exit_group+0x13/0x20 kernel/exit.c:933 __ia32_sys_exit_group+0x0/0x40 kernel/exit.c:931 __x64_sys_exit_group+0x37/0x40 kernel/exit.c:931 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae irq event stamp: 5379716 hardirqs last enabled at (5379716): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:168 [inline] hardirqs last enabled at (5379716): [] _raw_spin_unlock_irq+0x1f/0x40 kernel/locking/spinlock.c:199 hardirqs last disabled at (5379715): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline] hardirqs last disabled at (5379715): [] _raw_spin_lock_irq+0x49/0xa0 kernel/locking/spinlock.c:167 softirqs last enabled at (5379594): [] invoke_softirq kernel/softirq.c:221 [inline] softirqs last enabled at (5379594): [] __irq_exit_rcu+0x1d8/0x200 kernel/softirq.c:422 softirqs last disabled at (5379601): [] invoke_softirq kernel/softirq.c:221 [inline] softirqs last disabled at (5379601): [] __irq_exit_rcu+0x1d8/0x200 kernel/softirq.c:422 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 swapper/0/0: #0: ffffc90000007d70 ((&sk->sk_timer)#2){+.-.}-{0:0}, at: lockdep_copy_map include/linux/lockdep.h:45 [inline] #0: ffffc90000007d70 ((&sk->sk_timer)#2){+.-.}-{0:0}, at: call_timer_fn+0x57/0x160 kernel/time/timer.c:1421 stack backtrace: CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.12.0-rc5-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+0x176/0x24e lib/dump_stack.c:120 print_usage_bug+0xc05/0x1080 kernel/locking/lockdep.c:3806 mark_lock_irq kernel/locking/lockdep.c:3818 [inline] mark_lock+0x183a/0x1fe0 kernel/locking/lockdep.c:4478 mark_usage kernel/locking/lockdep.c:4373 [inline] __lock_acquire+0xbd8/0x5e60 kernel/locking/lockdep.c:4854 lock_acquire+0x126/0x650 kernel/locking/lockdep.c:5510 __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/0x170 net/bluetooth/sco.c:83 call_timer_fn+0x91/0x160 kernel/time/timer.c:1431 expire_timers kernel/time/timer.c:1476 [inline] __run_timers+0x6c0/0x8a0 kernel/time/timer.c:1745 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1758 __do_softirq+0x318/0x714 kernel/softirq.c:345 invoke_softirq kernel/softirq.c:221 [inline] __irq_exit_rcu+0x1d8/0x200 kernel/softirq.c:422 irq_exit_rcu+0x5/0x20 kernel/softirq.c:434 sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1100 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:632 RIP: 0010:native_save_fl arch/x86/include/asm/irqflags.h:29 [inline] RIP: 0010:arch_local_save_flags arch/x86/include/asm/irqflags.h:70 [inline] RIP: 0010:arch_irqs_disabled arch/x86/include/asm/irqflags.h:137 [inline] RIP: 0010:acpi_safe_halt drivers/acpi/processor_idle.c:111 [inline] RIP: 0010:acpi_idle_do_entry drivers/acpi/processor_idle.c:516 [inline] RIP: 0010:acpi_idle_enter+0x3c9/0x700 drivers/acpi/processor_idle.c:647 Code: 08 31 ff e8 f9 ba 55 fd 48 83 e3 08 0f 85 06 01 00 00 e8 fa b4 5b fd e9 0c 00 00 00 e8 30 b6 55 fd 0f 00 2d 39 ae fa 05 fb f4 <9c> 8f 44 24 10 48 8d 44 24 10 48 c1 e8 03 42 80 3c 38 00 74 0a 48 RSP: 0018:ffffffff8c407d80 EFLAGS: 00000282 RAX: 72de8b325f3aa100 RBX: 0000000000000000 RCX: ffffffff8ff89b03 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000 RBP: ffff888140f75800 R08: ffffffff817f17a0 R09: fffffbfff1897689 R10: fffffbfff1897689 R11: 0000000000000000 R12: ffff888016bb7804 R13: ffff888140f75864 R14: 1ffff11002d76f00 R15: dffffc0000000000 cpuidle_enter_state+0x486/0xd50 drivers/cpuidle/cpuidle.c:237 cpuidle_enter+0x59/0x90 drivers/cpuidle/cpuidle.c:351 call_cpuidle kernel/sched/idle.c:158 [inline] cpuidle_idle_call kernel/sched/idle.c:239 [inline] do_idle+0x315/0x530 kernel/sched/idle.c:300 cpu_startup_entry+0x15/0x20 kernel/sched/idle.c:397 start_kernel+0x49e/0x544 init/main.c:1064 secondary_startup_64_no_verify+0xb0/0xbb