================================ WARNING: inconsistent lock state 5.9.0-syzkaller #0 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. syz-executor.0/2639 [HC0[0]:SC0[0]:HE1:SE1] takes: ffff88806ad130a0 (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline] ffff88806ad130a0 (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}-{2:2}, at: sco_conn_del.isra.7+0x73/0x120 net/bluetooth/sco.c:176 {IN-SOFTIRQ-W} state was registered at: lock_acquire+0xf9/0x420 kernel/locking/lockdep.c:5442 __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+0x1d/0x80 net/bluetooth/sco.c:83 call_timer_fn+0xa5/0x300 kernel/time/timer.c:1415 expire_timers kernel/time/timer.c:1460 [inline] __run_timers kernel/time/timer.c:1757 [inline] run_timer_softirq+0x20d/0x570 kernel/time/timer.c:1770 __do_softirq+0xe9/0x52f kernel/softirq.c:298 asm_call_irq_on_stack+0xf/0x20 __run_on_irqstack arch/x86/include/asm/irq_stack.h:26 [inline] run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:77 [inline] do_softirq_own_stack+0x7c/0xa0 arch/x86/kernel/irq_64.c:77 invoke_softirq kernel/softirq.c:393 [inline] __irq_exit_rcu kernel/softirq.c:423 [inline] irq_exit_rcu+0xea/0x110 kernel/softirq.c:435 sysvec_apic_timer_interrupt+0x57/0xf0 arch/x86/kernel/apic/apic.c:1091 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:631 native_safe_halt+0xe/0x10 arch/x86/include/asm/irqflags.h:60 arch_safe_halt arch/x86/include/asm/paravirt.h:150 [inline] acpi_safe_halt drivers/acpi/processor_idle.c:111 [inline] acpi_idle_do_entry+0x50/0x90 drivers/acpi/processor_idle.c:517 acpi_idle_enter+0xa0/0xf0 drivers/acpi/processor_idle.c:648 cpuidle_enter_state+0x94/0x520 drivers/cpuidle/cpuidle.c:237 cpuidle_enter+0x24/0x40 drivers/cpuidle/cpuidle.c:351 call_cpuidle kernel/sched/idle.c:132 [inline] cpuidle_idle_call kernel/sched/idle.c:213 [inline] do_idle+0x2dc/0x350 kernel/sched/idle.c:273 cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:369 secondary_startup_64_no_verify+0xa6/0xab irq event stamp: 3011 hardirqs last enabled at (3011): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:168 [inline] hardirqs last enabled at (3011): [] _raw_spin_unlock_irq+0x1f/0x50 kernel/locking/spinlock.c:199 hardirqs last disabled at (3010): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline] hardirqs last disabled at (3010): [] _raw_spin_lock_irq+0x68/0x70 kernel/locking/spinlock.c:167 softirqs last enabled at (0): [] copy_process+0x9e9/0x1e40 kernel/fork.c:2030 softirqs last disabled at (0): [<0000000000000000>] 0x0 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-executor.0/2639: #0: ffff88811cf78f40 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close+0x62/0x500 net/bluetooth/hci_core.c:1720 #1: ffff88811cf78078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_do_close+0xf5/0x500 net/bluetooth/hci_core.c:1757 #2: ffffffff8464f3c8 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_disconn_cfm include/net/bluetooth/hci_core.h:1438 [inline] #2: ffffffff8464f3c8 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0x45/0xc0 net/bluetooth/hci_conn.c:1557 stack backtrace: CPU: 1 PID: 2639 Comm: syz-executor.0 Not tainted 5.9.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:77 [inline] dump_stack+0xa3/0xc8 lib/dump_stack.c:118 valid_state kernel/locking/lockdep.c:3750 [inline] mark_lock_irq kernel/locking/lockdep.c:3953 [inline] mark_lock.part.50+0x56f/0x5b0 kernel/locking/lockdep.c:4408 mark_lock kernel/locking/lockdep.c:4374 [inline] mark_usage kernel/locking/lockdep.c:4323 [inline] __lock_acquire+0x3b4/0x1770 kernel/locking/lockdep.c:4791 lock_acquire+0xf9/0x420 kernel/locking/lockdep.c:5442 __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.isra.7+0x73/0x120 net/bluetooth/sco.c:176 hci_disconn_cfm include/net/bluetooth/hci_core.h:1441 [inline] hci_conn_hash_flush+0x64/0xc0 net/bluetooth/hci_conn.c:1557 hci_dev_do_close+0x1ed/0x500 net/bluetooth/hci_core.c:1770 hci_unregister_dev+0xc0/0x2c0 net/bluetooth/hci_core.c:3827 vhci_release+0x2a/0x60 drivers/bluetooth/hci_vhci.c:340 __fput+0xaa/0x250 fs/file_table.c:281 task_work_run+0x68/0xb0 kernel/task_work.c:151 exit_task_work include/linux/task_work.h:30 [inline] do_exit+0x3aa/0xc80 kernel/exit.c:806 do_group_exit+0x42/0xb0 kernel/exit.c:903 get_signal+0x17c/0xc70 kernel/signal.c:2757 arch_do_signal+0x2b/0x900 arch/x86/kernel/signal.c:811 exit_to_user_mode_loop kernel/entry/common.c:161 [inline] exit_to_user_mode_prepare+0x1a2/0x220 kernel/entry/common.c:191 syscall_exit_to_user_mode+0x7a/0x2c0 kernel/entry/common.c:266 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45d5b9 Code: Unable to access opcode bytes at RIP 0x45d58f. RSP: 002b:00007ff58c298cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000118cfe8 RCX: 000000000045d5b9 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000118cfe8 RBP: 000000000118cfe0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118cfec R13: 00007fff2b4e3d2f R14: 00007ff58c2999c0 R15: 000000000118cfec