================================ WARNING: inconsistent lock state 5.14.0-rc7-syzkaller #0 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. syz-executor.4/23836 [HC0[0]:SC0[0]:HE1:SE1] takes: ffff8880832d70a0 (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline] ffff8880832d70a0 (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:1421 expire_timers kernel/time/timer.c:1466 [inline] __run_timers.part.0+0x675/0xa20 kernel/time/timer.c:1734 __run_timers kernel/time/timer.c:1715 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1747 __do_softirq+0x29b/0x9c2 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 get_current arch/x86/include/asm/current.h:15 [inline] finish_task_switch.isra.0+0x23c/0xa50 kernel/sched/core.c:4555 context_switch kernel/sched/core.c:4684 [inline] __schedule+0x942/0x26f0 kernel/sched/core.c:5938 schedule+0xd3/0x270 kernel/sched/core.c:6017 freezable_schedule include/linux/freezer.h:172 [inline] do_nanosleep+0x24e/0x690 kernel/time/hrtimer.c:1896 hrtimer_nanosleep+0x1f9/0x4a0 kernel/time/hrtimer.c:1949 common_nsleep+0xa2/0xc0 kernel/time/posix-timers.c:1227 __do_sys_clock_nanosleep kernel/time/posix-timers.c:1267 [inline] __se_sys_clock_nanosleep kernel/time/posix-timers.c:1245 [inline] __x64_sys_clock_nanosleep+0x2f4/0x430 kernel/time/posix-timers.c:1245 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: 11975 hardirqs last enabled at (11975): [] asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638 hardirqs last disabled at (11974): [] sysvec_apic_timer_interrupt+0xb/0xc0 arch/x86/kernel/apic/apic.c:1100 softirqs last enabled at (11234): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last enabled at (11234): [] __irq_exit_rcu+0x16e/0x1c0 kernel/softirq.c:636 softirqs last disabled at (11019): [] invoke_softirq kernel/softirq.c:432 [inline] softirqs last disabled at (11019): [] __irq_exit_rcu+0x16e/0x1c0 kernel/softirq.c:636 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 *** 4 locks held by syz-executor.4/23836: #0: ffffffff8d4b1268 (rfkill_global_mutex){+.+.}-{3:3}, at: rfkill_fop_write+0xff/0x500 net/rfkill/core.c:1260 #1: ffff88802b634ff0 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close+0xb7/0x1130 net/bluetooth/hci_core.c:1728 #2: ffff88802b634078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_do_close+0x22e/0x1130 net/bluetooth/hci_core.c:1765 #3: ffffffff8d2dd348 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_disconn_cfm include/net/bluetooth/hci_core.h:1498 [inline] #3: ffffffff8d2dd348 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0xda/0x260 net/bluetooth/hci_conn.c:1608 stack backtrace: CPU: 0 PID: 23836 Comm: syz-executor.4 Not tainted 5.14.0-rc7-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:105 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:1501 [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_rfkill_set_block+0x19c/0x1d0 net/bluetooth/hci_core.c:2226 rfkill_set_block+0x1f9/0x540 net/rfkill/core.c:344 rfkill_fop_write+0x267/0x500 net/rfkill/core.c:1268 do_loop_readv_writev fs/read_write.c:764 [inline] do_loop_readv_writev fs/read_write.c:748 [inline] do_iter_write+0x489/0x670 fs/read_write.c:868 vfs_writev+0x1aa/0x630 fs/read_write.c:939 do_writev+0x27f/0x300 fs/read_write.c:982 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 RIP: 0033:0x4665e9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 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 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fc605913188 EFLAGS: 00000246 ORIG_RAX: 0000000000000014 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665e9 RDX: 0000000000000001 RSI: 0000000020000000 RDI: 0000000000000006 RBP: 00000000004bfcc4 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffdc7238f2f R14: 00007fc605913300 R15: 0000000000022000