================================ WARNING: inconsistent lock state 5.10.60 #1 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. syz-executor.0/9427 [HC0[0]:SC0[0]:HE1:SE1] takes: ffff888042ee10a0 (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline] ffff888042ee10a0 (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}-{2:2}, at: sco_conn_del+0x128/0x270 net/bluetooth/sco.c:176 {IN-SOFTIRQ-W} state was registered at: lock_acquire kernel/locking/lockdep.c:5560 [inline] lock_acquire+0x197/0x490 kernel/locking/lockdep.c:5525 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x27/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:354 [inline] sco_sock_timeout+0x24/0x150 net/bluetooth/sco.c:83 call_timer_fn+0x182/0x580 kernel/time/timer.c:1414 expire_timers kernel/time/timer.c:1459 [inline] __run_timers.part.0+0x666/0x9d0 kernel/time/timer.c:1750 __run_timers kernel/time/timer.c:1731 [inline] run_timer_softirq+0x80/0x120 kernel/time/timer.c:1763 __do_softirq+0x1b6/0x86a kernel/softirq.c:298 asm_call_irq_on_stack+0x12/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+0x80/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+0x110/0x1a0 kernel/softirq.c:435 sysvec_apic_timer_interrupt+0x43/0xa0 arch/x86/kernel/apic/apic.c:1095 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:635 native_restore_fl arch/x86/include/asm/irqflags.h:41 [inline] arch_local_irq_restore arch/x86/include/asm/irqflags.h:84 [inline] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] _raw_spin_unlock_irqrestore+0x25/0x40 kernel/locking/spinlock.c:191 kmemleak_scan+0xce9/0x1140 mm/kmemleak.c:1478 kmemleak_write+0x55a/0x660 mm/kmemleak.c:1820 full_proxy_write+0x11d/0x190 fs/debugfs/file.c:234 vfs_write+0x295/0xa50 fs/read_write.c:603 ksys_write+0x12d/0x250 fs/read_write.c:658 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 irq event stamp: 8231 hardirqs last enabled at (8231): [] asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:635 hardirqs last disabled at (8230): [] sysvec_apic_timer_interrupt+0xb/0xa0 arch/x86/kernel/apic/apic.c:1095 softirqs last enabled at (8222): [] asm_call_irq_on_stack+0x12/0x20 softirqs last disabled at (8149): [] asm_call_irq_on_stack+0x12/0x20 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.0/9427: #0: ffffffff85418888 (rfkill_global_mutex){+.+.}-{3:3}, at: rfkill_fop_write+0xfe/0x4b0 net/rfkill/core.c:1232 #1: ffff88801af84f40 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close+0xee/0x1240 net/bluetooth/hci_core.c:1727 #2: ffff88801af84078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_do_close+0x23f/0x1240 net/bluetooth/hci_core.c:1764 #3: ffffffff85366d28 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_disconn_cfm include/net/bluetooth/hci_core.h:1440 [inline] #3: ffffffff85366d28 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0xc7/0x230 net/bluetooth/hci_conn.c:1557 stack backtrace: CPU: 0 PID: 9427 Comm: syz-executor.0 Not tainted 5.10.60 #1 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.14.0-0-g155821a1990b-prebuilt.qemu.org 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x107/0x163 lib/dump_stack.c:118 print_usage_bug kernel/locking/lockdep.c:3857 [inline] valid_state kernel/locking/lockdep.c:3869 [inline] mark_lock_irq kernel/locking/lockdep.c:4072 [inline] mark_lock.cold+0x19/0x159 kernel/locking/lockdep.c:4529 mark_usage kernel/locking/lockdep.c:4442 [inline] __lock_acquire+0x8cf/0x5b60 kernel/locking/lockdep.c:4904 lock_acquire kernel/locking/lockdep.c:5560 [inline] lock_acquire+0x197/0x490 kernel/locking/lockdep.c:5525 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x27/0x40 kernel/locking/spinlock.c:151 spin_lock include/linux/spinlock.h:354 [inline] sco_conn_del+0x128/0x270 net/bluetooth/sco.c:176 sco_disconn_cfm net/bluetooth/sco.c:1189 [inline] sco_disconn_cfm+0x62/0x80 net/bluetooth/sco.c:1182 hci_disconn_cfm include/net/bluetooth/hci_core.h:1443 [inline] hci_conn_hash_flush+0x119/0x230 net/bluetooth/hci_conn.c:1557 hci_dev_do_close+0x717/0x1240 net/bluetooth/hci_core.c:1777 hci_rfkill_set_block+0x154/0x190 net/bluetooth/hci_core.c:2216 rfkill_set_block+0x20f/0x560 net/rfkill/core.c:341 rfkill_fop_write+0x252/0x4b0 net/rfkill/core.c:1240 vfs_write+0x295/0xa50 fs/read_write.c:603 ksys_write+0x1ee/0x250 fs/read_write.c:658 do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x466609 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:00007f3e51cd1188 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 0000000000466609 RDX: 0000000000000008 RSI: 0000000020000200 RDI: 0000000000000003 RBP: 00000000004bfcb9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007ffd63078a6f R14: 00007f3e51cd1300 R15: 0000000000022000 tmpfs: Bad value for 'nr_inodes' tmpfs: Bad value for 'nr_inodes' kmemleak: 11 new suspected memory leaks (see /sys/kernel/debug/kmemleak)