================================ WARNING: inconsistent lock state 4.14.261-syzkaller #0 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. syz-executor.1/31324 [HC0[0]:SC0[0]:HE1:SE1] takes: (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}, at: [] spin_lock include/linux/spinlock.h:317 [inline] (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}, at: [] sco_conn_del+0xbb/0x1f0 net/bluetooth/sco.c:174 {IN-SOFTIRQ-W} state was registered at: lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:152 spin_lock include/linux/spinlock.h:317 [inline] sco_sock_timeout+0x29/0x120 net/bluetooth/sco.c:82 call_timer_fn+0x14a/0x650 kernel/time/timer.c:1280 expire_timers+0x232/0x4d0 kernel/time/timer.c:1319 __run_timers kernel/time/timer.c:1637 [inline] run_timer_softirq+0x1d5/0x5a0 kernel/time/timer.c:1650 __do_softirq+0x24d/0x9ff kernel/softirq.c:288 invoke_softirq kernel/softirq.c:368 [inline] irq_exit+0x193/0x240 kernel/softirq.c:409 exiting_irq arch/x86/include/asm/apic.h:638 [inline] smp_apic_timer_interrupt+0x141/0x5e0 arch/x86/kernel/apic/apic.c:1106 apic_timer_interrupt+0x93/0xa0 arch/x86/entry/entry_64.S:793 radix_tree_deref_slot include/linux/radix-tree.h:238 [inline] filemap_map_pages+0x765/0xe40 mm/filemap.c:2541 do_fault_around+0x1fe/0x620 mm/memory.c:3697 do_read_fault mm/memory.c:3731 [inline] do_fault mm/memory.c:3862 [inline] handle_pte_fault mm/memory.c:4092 [inline] __handle_mm_fault+0x2b1f/0x4620 mm/memory.c:4216 handle_mm_fault+0x455/0x9c0 mm/memory.c:4253 __do_page_fault+0x549/0xad0 arch/x86/mm/fault.c:1442 page_fault+0x45/0x50 arch/x86/entry/entry_64.S:1123 irq event stamp: 4623 hardirqs last enabled at (4623): [] kfree+0x14a/0x250 mm/slab.c:3816 hardirqs last disabled at (4622): [] kfree+0x6f/0x250 mm/slab.c:3809 softirqs last enabled at (3940): [] spin_unlock_bh include/linux/spinlock.h:362 [inline] softirqs last enabled at (3940): [] __rhashtable_remove_fast_one include/linux/rhashtable.h:1071 [inline] softirqs last enabled at (3940): [] __rhashtable_remove_fast include/linux/rhashtable.h:1101 [inline] softirqs last enabled at (3940): [] rhashtable_remove_fast include/linux/rhashtable.h:1130 [inline] softirqs last enabled at (3940): [] ipc_kht_remove.part.0+0x41e/0x870 ipc/util.c:412 softirqs last disabled at (3938): [] spin_lock_bh include/linux/spinlock.h:322 [inline] softirqs last disabled at (3938): [] __rhashtable_remove_fast_one include/linux/rhashtable.h:1024 [inline] softirqs last disabled at (3938): [] __rhashtable_remove_fast include/linux/rhashtable.h:1101 [inline] softirqs last disabled at (3938): [] rhashtable_remove_fast include/linux/rhashtable.h:1130 [inline] softirqs last disabled at (3938): [] ipc_kht_remove.part.0+0x234/0x870 ipc/util.c:412 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.1/31324: #0: (&hdev->req_lock){+.+.}, at: [] hci_dev_do_close+0xa8/0xd80 net/bluetooth/hci_core.c:1589 #1: (&hdev->lock){+.+.}, at: [] hci_dev_do_close+0x264/0xd80 net/bluetooth/hci_core.c:1628 #2: (hci_cb_list_lock){+.+.}, at: [] hci_disconn_cfm include/net/bluetooth/hci_core.h:1225 [inline] #2: (hci_cb_list_lock){+.+.}, at: [] hci_conn_hash_flush+0xda/0x260 net/bluetooth/hci_conn.c:1393 stack backtrace: CPU: 0 PID: 31324 Comm: syz-executor.1 Not tainted 4.14.261-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0x1b2/0x281 lib/dump_stack.c:58 print_usage_bug.cold+0x42e/0x570 kernel/locking/lockdep.c:2589 valid_state kernel/locking/lockdep.c:2602 [inline] mark_lock_irq kernel/locking/lockdep.c:2796 [inline] mark_lock+0xb4d/0x1050 kernel/locking/lockdep.c:3194 mark_irqflags kernel/locking/lockdep.c:3090 [inline] __lock_acquire+0xd5c/0x3f20 kernel/locking/lockdep.c:3448 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998 __raw_spin_lock include/linux/spinlock_api_smp.h:142 [inline] _raw_spin_lock+0x2a/0x40 kernel/locking/spinlock.c:152 spin_lock include/linux/spinlock.h:317 [inline] sco_conn_del+0xbb/0x1f0 net/bluetooth/sco.c:174 sco_disconn_cfm+0x65/0xa0 net/bluetooth/sco.c:1136 hci_disconn_cfm include/net/bluetooth/hci_core.h:1228 [inline] hci_conn_hash_flush+0x127/0x260 net/bluetooth/hci_conn.c:1393 hci_dev_do_close+0x57d/0xd80 net/bluetooth/hci_core.c:1641 hci_unregister_dev+0x143/0x420 net/bluetooth/hci_core.c:3208 vhci_release+0x70/0xe0 drivers/bluetooth/hci_vhci.c:354 __fput+0x25f/0x7a0 fs/file_table.c:210 task_work_run+0x11f/0x190 kernel/task_work.c:113 exit_task_work include/linux/task_work.h:22 [inline] do_exit+0xa44/0x2850 kernel/exit.c:868 do_group_exit+0x100/0x2e0 kernel/exit.c:965 get_signal+0x38d/0x1ca0 kernel/signal.c:2412 do_signal+0x7c/0x1550 arch/x86/kernel/signal.c:792 exit_to_usermode_loop+0x160/0x200 arch/x86/entry/common.c:160 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x4a3/0x640 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x46/0xbb RIP: 0033:0x7fc720cc6e99 RSP: 002b:00007fc71f63c218 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 00007fc720dd9f68 RCX: 00007fc720cc6e99 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 00007fc720dd9f68 RBP: 00007fc720dd9f60 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fc720dd9f6c R13: 00007ffeb0f71aff R14: 00007fc71f63c300 R15: 0000000000022000