================================ WARNING: inconsistent lock state 5.13.0-rc4-syzkaller #0 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. syz-executor.5/12839 [HC0[0]:SC0[0]:HE1:SE1] takes: ffff88807719f0a0 (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline] ffff88807719f0a0 (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}-{2:2}, at: sco_conn_del+0x113/0x2a0 net/bluetooth/sco.c:176 {IN-SOFTIRQ-W} state was registered at: lock_acquire+0x17f/0x720 kernel/locking/lockdep.c:5512 __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/0x170 net/bluetooth/sco.c:83 call_timer_fn+0xf6/0x210 kernel/time/timer.c:1431 expire_timers kernel/time/timer.c:1476 [inline] __run_timers+0x6ff/0x910 kernel/time/timer.c:1745 run_timer_softirq+0x63/0xf0 kernel/time/timer.c:1758 __do_softirq+0x372/0x7a6 kernel/softirq.c:559 invoke_softirq kernel/softirq.c:433 [inline] __irq_exit_rcu+0x245/0x280 kernel/softirq.c:637 irq_exit_rcu+0x5/0x20 kernel/softirq.c:649 sysvec_apic_timer_interrupt+0x91/0xb0 arch/x86/kernel/apic/apic.c:1100 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:647 kasan_mem_to_shadow include/linux/kasan.h:54 [inline] memory_is_poisoned_n mm/kasan/generic.c:128 [inline] memory_is_poisoned mm/kasan/generic.c:159 [inline] check_region_inline mm/kasan/generic.c:177 [inline] kasan_check_range+0x44/0x2f0 mm/kasan/generic.c:186 instrument_atomic_read_write include/linux/instrumented.h:101 [inline] atomic_dec_and_test include/asm-generic/atomic-instrumented.h:748 [inline] page_ref_dec_and_test include/linux/page_ref.h:148 [inline] put_page_testzero include/linux/mm.h:747 [inline] release_pages+0x2f6/0x1b80 mm/swap.c:940 tlb_batch_pages_flush mm/mmu_gather.c:49 [inline] tlb_flush_mmu_free mm/mmu_gather.c:242 [inline] tlb_flush_mmu+0x780/0x910 mm/mmu_gather.c:249 zap_pte_range+0x19c7/0x1b60 mm/memory.c:1336 zap_pmd_range mm/memory.c:1374 [inline] zap_pud_range mm/memory.c:1403 [inline] zap_p4d_range mm/memory.c:1424 [inline] unmap_page_range+0x55a/0x890 mm/memory.c:1445 unmap_vmas+0x1d1/0x360 mm/memory.c:1522 exit_mmap+0x2af/0x5f0 mm/mmap.c:3208 __mmput+0x111/0x370 kernel/fork.c:1096 exit_mm+0x67e/0x7d0 kernel/exit.c:502 do_exit+0x6b9/0x23d0 kernel/exit.c:813 do_group_exit+0x168/0x2d0 kernel/exit.c:923 get_signal+0x1770/0x2180 kernel/signal.c:2835 arch_do_signal_or_restart+0x8e/0x6c0 arch/x86/kernel/signal.c:789 handle_signal_work kernel/entry/common.c:147 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0xac/0x200 kernel/entry/common.c:208 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline] syscall_exit_to_user_mode+0x26/0x70 kernel/entry/common.c:301 do_syscall_64+0x4b/0xb0 arch/x86/entry/common.c:57 entry_SYSCALL_64_after_hwframe+0x44/0xae irq event stamp: 3413 hardirqs last enabled at (3413): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:168 [inline] hardirqs last enabled at (3413): [] _raw_spin_unlock_irq+0x1f/0x40 kernel/locking/spinlock.c:199 hardirqs last disabled at (3412): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline] hardirqs last disabled at (3412): [] _raw_spin_lock_irq+0x89/0xf0 kernel/locking/spinlock.c:167 softirqs last enabled at (2052): [] invoke_softirq kernel/softirq.c:433 [inline] softirqs last enabled at (2052): [] __irq_exit_rcu+0x245/0x280 kernel/softirq.c:637 softirqs last disabled at (1937): [] invoke_softirq kernel/softirq.c:433 [inline] softirqs last disabled at (1937): [] __irq_exit_rcu+0x245/0x280 kernel/softirq.c:637 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.5/12839: #0: ffff88801e444f48 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close+0x176/0xfe0 net/bluetooth/hci_core.c:1730 #1: ffff88801e444078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_do_close+0x3c3/0xfe0 net/bluetooth/hci_core.c:1767 #2: ffffffff8e073d28 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_disconn_cfm include/net/bluetooth/hci_core.h:1496 [inline] #2: ffffffff8e073d28 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0xb8/0x240 net/bluetooth/hci_conn.c:1608 stack backtrace: CPU: 0 PID: 12839 Comm: syz-executor.5 Not tainted 5.13.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x202/0x31e lib/dump_stack.c:120 print_usage_bug+0xd5e/0x1210 kernel/locking/lockdep.c:3808 mark_lock_irq kernel/locking/lockdep.c:3820 [inline] mark_lock+0x1708/0x1eb0 kernel/locking/lockdep.c:4480 mark_usage kernel/locking/lockdep.c:4393 [inline] __lock_acquire+0xd97/0x6040 kernel/locking/lockdep.c:4856 lock_acquire+0x17f/0x720 kernel/locking/lockdep.c:5512 __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+0x113/0x2a0 net/bluetooth/sco.c:176 hci_disconn_cfm include/net/bluetooth/hci_core.h:1499 [inline] hci_conn_hash_flush+0x112/0x240 net/bluetooth/hci_conn.c:1608 hci_dev_do_close+0xa04/0xfe0 net/bluetooth/hci_core.c:1780 hci_unregister_dev+0x35b/0x19b0 net/bluetooth/hci_core.c:3994 vhci_release+0x73/0xc0 drivers/bluetooth/hci_vhci.c:340 __fput+0x352/0x7b0 fs/file_table.c:280 task_work_run+0x146/0x1c0 kernel/task_work.c:164 exit_task_work include/linux/task_work.h:32 [inline] do_exit+0x736/0x23d0 kernel/exit.c:826 do_group_exit+0x168/0x2d0 kernel/exit.c:923 get_signal+0x1770/0x2180 kernel/signal.c:2835 arch_do_signal_or_restart+0x8e/0x6c0 arch/x86/kernel/signal.c:789 handle_signal_work kernel/entry/common.c:147 [inline] exit_to_user_mode_loop kernel/entry/common.c:171 [inline] exit_to_user_mode_prepare+0xac/0x200 kernel/entry/common.c:208 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline] syscall_exit_to_user_mode+0x26/0x70 kernel/entry/common.c:301 do_syscall_64+0x4b/0xb0 arch/x86/entry/common.c:57 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x4665d9 Code: Unable to access opcode bytes at RIP 0x4665af. RSP: 002b:00007f9ab20a9218 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000056bf88 RCX: 00000000004665d9 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000056bf88 RBP: 000000000056bf80 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf8c R13: 00007ffd5c572f4f R14: 00007f9ab20a9300 R15: 0000000000022000