================================ WARNING: inconsistent lock state 5.9.0-rc6-syzkaller #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-executor.0/21319 [HC0[0]:SC1[1]:HE1:SE0] takes: ffff8880a012c0a0 (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline] ffff8880a012c0a0 (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}-{2:2}, at: sco_sock_timeout+0x24/0x140 net/bluetooth/sco.c:83 {SOFTIRQ-ON-W} state was registered at: lock_acquire+0x1f3/0xaf0 kernel/locking/lockdep.c:5029 __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+0x128/0x270 net/bluetooth/sco.c:176 sco_disconn_cfm net/bluetooth/sco.c:1178 [inline] sco_disconn_cfm+0x62/0x80 net/bluetooth/sco.c:1171 hci_disconn_cfm include/net/bluetooth/hci_core.h:1438 [inline] hci_conn_hash_flush+0x114/0x220 net/bluetooth/hci_conn.c:1557 hci_dev_do_close+0x5c6/0x1080 net/bluetooth/hci_core.c:1770 hci_unregister_dev+0x1bd/0xe30 net/bluetooth/hci_core.c:3790 vhci_release+0x70/0xe0 drivers/bluetooth/hci_vhci.c:340 __fput+0x285/0x920 fs/file_table.c:281 task_work_run+0xdd/0x190 kernel/task_work.c:141 exit_task_work include/linux/task_work.h:25 [inline] do_exit+0xb7d/0x29f0 kernel/exit.c:806 do_group_exit+0x125/0x310 kernel/exit.c:903 __do_sys_exit_group kernel/exit.c:914 [inline] __se_sys_exit_group kernel/exit.c:912 [inline] __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:912 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 irq event stamp: 605302 hardirqs last enabled at (605302): [] asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:581 hardirqs last disabled at (605301): [] irqentry_enter+0x1d/0x50 kernel/entry/common.c:344 softirqs last enabled at (601142): [] asm_call_on_stack+0xf/0x20 arch/x86/entry/entry_64.S:706 softirqs last disabled at (602063): [] asm_call_on_stack+0xf/0x20 arch/x86/entry/entry_64.S:706 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/21319: #0: ffffffff8b13c030 (pernet_ops_rwsem){++++}-{3:3}, at: copy_net_ns+0x2ac/0x5e0 net/core/net_namespace.c:478 #1: ffffffff8a067f40 (rcu_read_lock){....}-{1:2}, at: inet_twsk_purge+0xd0/0x7b0 net/ipv4/inet_timewait_sock.c:270 #2: ffffc90000da8d68 ((&sk->sk_timer)#2){+.-.}-{0:0}, at: lockdep_copy_map include/linux/lockdep.h:35 [inline] #2: ffffc90000da8d68 ((&sk->sk_timer)#2){+.-.}-{0:0}, at: call_timer_fn+0xdb/0x760 kernel/time/timer.c:1403 stack backtrace: CPU: 1 PID: 21319 Comm: syz-executor.0 Not tainted 5.9.0-rc6-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x198/0x1fd lib/dump_stack.c:118 print_usage_bug kernel/locking/lockdep.c:3350 [inline] valid_state kernel/locking/lockdep.c:3361 [inline] mark_lock_irq kernel/locking/lockdep.c:3560 [inline] mark_lock.cold+0x11/0x2d kernel/locking/lockdep.c:4020 mark_usage kernel/locking/lockdep.c:3905 [inline] __lock_acquire+0x1159/0x5780 kernel/locking/lockdep.c:4395 lock_acquire+0x1f3/0xaf0 kernel/locking/lockdep.c:5029 __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+0x24/0x140 net/bluetooth/sco.c:83 call_timer_fn+0x1ac/0x760 kernel/time/timer.c:1413 expire_timers kernel/time/timer.c:1458 [inline] __run_timers.part.0+0x67c/0xaa0 kernel/time/timer.c:1755 __run_timers kernel/time/timer.c:1736 [inline] run_timer_softirq+0xb3/0x1d0 kernel/time/timer.c:1768 __do_softirq+0x1f8/0xb23 kernel/softirq.c:298 asm_call_on_stack+0xf/0x20 arch/x86/entry/entry_64.S:706 __run_on_irqstack arch/x86/include/asm/irq_stack.h:22 [inline] run_on_irqstack_cond arch/x86/include/asm/irq_stack.h:48 [inline] do_softirq_own_stack+0x9d/0xd0 arch/x86/kernel/irq_64.c:77 invoke_softirq kernel/softirq.c:393 [inline] __irq_exit_rcu kernel/softirq.c:423 [inline] irq_exit_rcu+0x235/0x280 kernel/softirq.c:435 sysvec_apic_timer_interrupt+0x51/0xf0 arch/x86/kernel/apic/apic.c:1091 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:581 RIP: 0010:rcu_rnp_online_cpus kernel/rcu/tree.c:216 [inline] RIP: 0010:rcu_lockdep_current_cpu_online kernel/rcu/tree.c:1163 [inline] RIP: 0010:rcu_lockdep_current_cpu_online+0xc3/0x120 kernel/rcu/tree.c:1152 Code: fa 48 c1 ea 03 80 3c 02 00 75 61 48 8d 7d 70 48 8b 5b 20 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 75 49 <48> 8b 45 70 48 85 c3 0f 95 c0 65 ff 0d 1c 30 9f 7e 74 03 5b 5d c3 RSP: 0000:ffffc90017717740 EFLAGS: 00000246 RAX: dffffc0000000000 RBX: 0000000000000002 RCX: ffffffff815c000f RDX: 1ffffffff140df5e RSI: 0000000000000002 RDI: ffffffff8a06faf0 RBP: ffffffff8a06fa80 R08: 0000000000000000 R09: ffffffff8b59688f R10: fffffbfff16b2d11 R11: 0000000000000000 R12: 0000000000000001 R13: ffffffff8a067f40 R14: ffffffff86e4e4ab R15: dffffc0000000000 rcu_read_lock_held_common kernel/rcu/update.c:123 [inline] rcu_read_lock_held_common kernel/rcu/update.c:113 [inline] rcu_read_lock_sched_held+0x25/0xb0 kernel/rcu/update.c:134 trace_lock_release include/trace/events/lock.h:58 [inline] lock_release+0x6a1/0x8f0 kernel/locking/lockdep.c:5040 rcu_lock_release include/linux/rcupdate.h:246 [inline] rcu_read_unlock include/linux/rcupdate.h:688 [inline] inet_twsk_purge+0x53d/0x7b0 net/ipv4/inet_timewait_sock.c:299 ops_exit_list+0x10d/0x160 net/core/net_namespace.c:189 setup_net+0x502/0x850 net/core/net_namespace.c:364 copy_net_ns+0x2cf/0x5e0 net/core/net_namespace.c:482 create_new_namespaces+0x3f6/0xb10 kernel/nsproxy.c:110 copy_namespaces+0x385/0x470 kernel/nsproxy.c:179 copy_process+0x294b/0x6940 kernel/fork.c:2072 _do_fork+0xe8/0xb10 kernel/fork.c:2428 __do_sys_clone3+0x1dd/0x320 kernel/fork.c:2703 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xa9 RIP: 0033:0x45e179 Code: 3d b2 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 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 0f 83 0b b2 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007fded084dc78 EFLAGS: 00000246 ORIG_RAX: 00000000000001b3 RAX: ffffffffffffffda RBX: 0000000000002000 RCX: 000000000045e179 RDX: 0000000000000000 RSI: 0000000000000058 RDI: 0000000020000900 RBP: 000000000118d020 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000118cff4 R13: 00007fffb6f1614f R14: 00007fded084e9c0 R15: 000000000118cff4