================================ WARNING: inconsistent lock state 5.10.60 #1 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. syz-executor.3/29097 [HC0[0]:SC0[0]:HE1:SE1] takes: ffff8880488060a0 (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline] ffff8880488060a0 (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 run_ksoftirqd kernel/softirq.c:653 [inline] run_ksoftirqd+0x21/0x50 kernel/softirq.c:645 smpboot_thread_fn+0x3f5/0x860 kernel/smpboot.c:164 kthread+0x38f/0x470 kernel/kthread.c:292 ret_from_fork+0x22/0x30 arch/x86/entry/entry_64.S:296 irq event stamp: 38259 hardirqs last enabled at (38259): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:168 [inline] hardirqs last enabled at (38259): [] _raw_spin_unlock_irq+0x1f/0x30 kernel/locking/spinlock.c:199 hardirqs last disabled at (38258): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline] hardirqs last disabled at (38258): [] _raw_spin_lock_irq+0x3e/0x40 kernel/locking/spinlock.c:167 softirqs last enabled at (38108): [] spin_unlock_bh include/linux/spinlock.h:399 [inline] softirqs last enabled at (38108): [] fib6_run_gc+0x1e0/0x2d0 net/ipv6/ip6_fib.c:2338 softirqs last disabled at (38100): [] spin_trylock_bh include/linux/spinlock.h:414 [inline] softirqs last disabled at (38100): [] fib6_run_gc+0x227/0x2d0 net/ipv6/ip6_fib.c:2320 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.3/29097: #0: ffffffff85418888 (rfkill_global_mutex){+.+.}-{3:3}, at: rfkill_fop_write+0xfe/0x4b0 net/rfkill/core.c:1232 #1: ffff88804bd0cf40 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close+0xee/0x1240 net/bluetooth/hci_core.c:1727 #2: ffff88804bd0c078 (&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: 29097 Comm: syz-executor.3 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:00007f3d20183188 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 0000000000466609 RDX: 0000000000000008 RSI: 0000000020000080 RDI: 0000000000000003 RBP: 00000000004bfcb9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007fffddcc0fef R14: 00007f3d20183300 R15: 0000000000022000 kmemleak: 14 new suspected memory leaks (see /sys/kernel/debug/kmemleak)