================================ WARNING: inconsistent lock state 5.13.0-rc7-syzkaller #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-executor907/19672 [HC0[0]:SC1[1]:HE1:SE0] takes: ffff88802ae750a0 (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline] ffff88802ae750a0 (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}-{2:2}, at: sco_sock_timeout+0x33/0x1b0 net/bluetooth/sco.c:83 {SOFTIRQ-ON-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_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 irq event stamp: 330 hardirqs last enabled at (330): [] __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:168 [inline] hardirqs last enabled at (330): [] _raw_spin_unlock_irq+0x1f/0x40 kernel/locking/spinlock.c:199 hardirqs last disabled at (329): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline] hardirqs last disabled at (329): [] _raw_spin_lock_irq+0x41/0x50 kernel/locking/spinlock.c:167 softirqs last enabled at (0): [] copy_process+0x1d77/0x7120 kernel/fork.c:2062 softirqs last disabled at (323): [] invoke_softirq kernel/softirq.c:433 [inline] softirqs last disabled at (323): [] __irq_exit_rcu+0x136/0x200 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 *** 2 locks held by syz-executor907/19672: #0: ffffffff8bf79860 (rcu_read_lock){....}-{1:2}, at: __do_sys_setpgid+0x85/0x770 kernel/sys.c:1037 #1: ffffc90000dc0d70 ((&sk->sk_timer)){+.-.}-{0:0}, at: lockdep_copy_map include/linux/lockdep.h:35 [inline] #1: ffffc90000dc0d70 ((&sk->sk_timer)){+.-.}-{0:0}, at: call_timer_fn+0xd5/0x6b0 kernel/time/timer.c:1421 stack backtrace: CPU: 1 PID: 19672 Comm: syz-executor907 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:4377 [inline] __lock_acquire+0x11aa/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_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 RIP: 0010:__raw_write_unlock_irq include/linux/rwlock_api_smp.h:268 [inline] RIP: 0010:_raw_write_unlock_irq+0x25/0x40 kernel/locking/spinlock.c:343 Code: 0f 1f 44 00 00 55 48 8b 74 24 08 48 89 fd 48 83 c7 18 e8 7e e2 40 f8 48 89 ef e8 56 5f 41 f8 e8 81 4a 61 f8 fb bf 01 00 00 00 56 4f 35 f8 65 8b 05 2f 51 e8 76 85 c0 74 02 5d c3 e8 eb a6 e6 RSP: 0018:ffffc9002107fee8 EFLAGS: 00000206 RAX: 0000000000000141 RBX: ffff888029aa5a00 RCX: 1ffffffff1b927b9 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000001 RBP: ffffffff8bc0a080 R08: 0000000000000001 R09: 0000000000000001 R10: ffffffff817ae938 R11: 0000000000000000 R12: ffff88814cc81c40 R13: 0000000000000000 R14: ffff88814cc81c40 R15: ffff88814cc82460 __do_sys_setpgid+0x1fd/0x770 kernel/sys.c:1092 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x470fc7 Code: 00 00 00 b8 68 00 00 00 0f 05 c3 0f 1f 84 00 00 00 00 00 b8 6c 00 00 00 0f 05 c3 0f 1f 84 00 00 00 00 00 b8 6d 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffc2ff3e7b8 EFLAGS: 00000246 ORIG_RAX: 000000000000006d RAX: ffffffffffffffda RBX: 00007ffc2ff3e990 RCX: 0000000000470fc7 RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000000 R08: 0000000000000000 R09: 00000000004c9130 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000000f4240 R13: 00007ffc2ff3e7f0 R14: 00007ffc2ff3e990 R15: 00007ffc2ff3e870