================================ WARNING: inconsistent lock state 5.13.0-rc7-syzkaller #0 Not tainted -------------------------------- inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage. syz-executor.0/14768 [HC0[0]:SC0[0]:HE1:SE1] takes: ffff8880725130a0 (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline] ffff8880725130a0 (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:5514 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5479 __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:1431 expire_timers kernel/time/timer.c:1476 [inline] __run_timers.part.0+0x67c/0xa50 kernel/time/timer.c:1745 __run_timers kernel/time/timer.c:1726 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1758 __do_softirq+0x29b/0x9f6 kernel/softirq.c:559 invoke_softirq kernel/softirq.c:433 [inline] __irq_exit_rcu+0x136/0x200 kernel/softirq.c:637 irq_exit_rcu+0x5/0x20 kernel/softirq.c:649 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:647 arch_atomic_read arch/x86/include/asm/atomic.h:29 [inline] rcu_dynticks_curr_cpu_in_eqs kernel/rcu/tree.c:327 [inline] rcu_is_watching+0x63/0xc0 kernel/rcu/tree.c:1168 rcu_read_lock_held_common kernel/rcu/update.c:108 [inline] rcu_read_lock_sched_held+0x1c/0x70 kernel/rcu/update.c:123 trace_lock_release include/trace/events/lock.h:58 [inline] lock_release+0x5d3/0x720 kernel/locking/lockdep.c:5525 zap_pte_range mm/memory.c:1270 [inline] zap_pmd_range mm/memory.c:1385 [inline] zap_pud_range mm/memory.c:1414 [inline] zap_p4d_range mm/memory.c:1435 [inline] unmap_page_range+0xea6/0x2890 mm/memory.c:1456 unmap_single_vma+0x198/0x300 mm/memory.c:1501 unmap_vmas+0x16d/0x2f0 mm/memory.c:1533 exit_mmap+0x2a8/0x590 mm/mmap.c:3208 __mmput+0x122/0x470 kernel/fork.c:1096 mmput+0x58/0x60 kernel/fork.c:1117 exit_mm kernel/exit.c:502 [inline] do_exit+0xb0a/0x2a60 kernel/exit.c:813 do_group_exit+0x125/0x310 kernel/exit.c:923 get_signal+0x47f/0x2150 kernel/signal.c:2850 arch_do_signal_or_restart+0x2a8/0x1eb0 arch/x86/kernel/signal.c:789 handle_signal_work kernel/entry/common.c:148 [inline] exit_to_user_mode_loop kernel/entry/common.c:172 [inline] exit_to_user_mode_prepare+0x180/0x290 kernel/entry/common.c:209 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:302 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:57 entry_SYSCALL_64_after_hwframe+0x44/0xae irq event stamp: 3487 hardirqs last enabled at (3487): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:168 [inline] hardirqs last enabled at (3487): [] _raw_spin_unlock_irq+0x1f/0x40 kernel/locking/spinlock.c:199 hardirqs last disabled at (3486): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline] hardirqs last disabled at (3486): [] _raw_spin_lock_irq+0x41/0x50 kernel/locking/spinlock.c:167 softirqs last enabled at (52): [] inet_csk_accept+0x5c3/0x9d0 net/ipv4/inet_connection_sock.c:513 softirqs last disabled at (50): [] spin_lock_bh include/linux/spinlock.h:359 [inline] softirqs last disabled at (50): [] release_sock+0x1b/0x1b0 net/core/sock.c:3080 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.0/14768: #0: ffff888078ec0f48 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close+0x111/0x1110 net/bluetooth/hci_core.c:1735 #1: ffff888078ec0078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_do_close+0x26f/0x1110 net/bluetooth/hci_core.c:1772 #2: ffffffff8d8b3688 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_disconn_cfm include/net/bluetooth/hci_core.h:1496 [inline] #2: ffffffff8d8b3688 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0xda/0x260 net/bluetooth/hci_conn.c:1608 stack backtrace: CPU: 0 PID: 14768 Comm: syz-executor.0 Not tainted 5.13.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:79 [inline] dump_stack+0x141/0x1d7 lib/dump_stack.c:120 print_usage_bug kernel/locking/lockdep.c:203 [inline] valid_state kernel/locking/lockdep.c:3822 [inline] mark_lock_irq kernel/locking/lockdep.c:4025 [inline] mark_lock.cold+0x61/0x8e kernel/locking/lockdep.c:4482 mark_usage kernel/locking/lockdep.c:4395 [inline] __lock_acquire+0x880/0x5230 kernel/locking/lockdep.c:4858 lock_acquire kernel/locking/lockdep.c:5514 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5479 __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+0x74/0xb0 net/bluetooth/sco.c:1189 hci_disconn_cfm include/net/bluetooth/hci_core.h:1499 [inline] hci_conn_hash_flush+0x127/0x260 net/bluetooth/hci_conn.c:1608 hci_dev_do_close+0x569/0x1110 net/bluetooth/hci_core.c:1785 hci_unregister_dev+0x263/0x1130 net/bluetooth/hci_core.c:3999 vhci_release+0x70/0xe0 drivers/bluetooth/hci_vhci.c:340 __fput+0x288/0x920 fs/file_table.c:280 task_work_run+0xdd/0x1a0 kernel/task_work.c:164 exit_task_work include/linux/task_work.h:32 [inline] do_exit+0xbfc/0x2a60 kernel/exit.c:826 do_group_exit+0x125/0x310 kernel/exit.c:923 get_signal+0x47f/0x2150 kernel/signal.c:2850 arch_do_signal_or_restart+0x2a8/0x1eb0 arch/x86/kernel/signal.c:789 handle_signal_work kernel/entry/common.c:148 [inline] exit_to_user_mode_loop kernel/entry/common.c:172 [inline] exit_to_user_mode_prepare+0x180/0x290 kernel/entry/common.c:209 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:302 do_syscall_64+0x47/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:00007fd9f0bd7188 EFLAGS: 00000246 ORIG_RAX: 000000000000002b RAX: fffffffffffffe00 RBX: 000000000056bf80 RCX: 00000000004665d9 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000003 RBP: 00000000004bfcb9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007fffb7c07f1f R14: 00007fd9f0bd7300 R15: 0000000000022000