================================ WARNING: inconsistent lock state 5.13.0-rc3-syzkaller #0 Not tainted -------------------------------- inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage. syz-executor.2/18853 [HC0[0]:SC1[1]:HE1:SE0] takes: ffff8880733020a0 (slock-AF_BLUETOOTH-BTPROTO_SCO){+.?.}-{2:2}, at: spin_lock include/linux/spinlock.h:354 [inline] ffff8880733020a0 (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:5512 [inline] lock_acquire+0x1ab/0x740 kernel/locking/lockdep.c:5477 __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:1780 hci_unregister_dev+0x263/0x1130 net/bluetooth/hci_core.c:3994 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 __do_sys_exit_group kernel/exit.c:934 [inline] __se_sys_exit_group kernel/exit.c:932 [inline] __x64_sys_exit_group+0x3a/0x50 kernel/exit.c:932 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae irq event stamp: 18498 hardirqs last enabled at (18498): [] asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:647 hardirqs last disabled at (18497): [] sysvec_apic_timer_interrupt+0xb/0xc0 arch/x86/kernel/apic/apic.c:1100 softirqs last enabled at (16816): [] invoke_softirq kernel/softirq.c:433 [inline] softirqs last enabled at (16816): [] __irq_exit_rcu+0x136/0x200 kernel/softirq.c:637 softirqs last disabled at (17877): [] invoke_softirq kernel/softirq.c:433 [inline] softirqs last disabled at (17877): [] __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 *** 4 locks held by syz-executor.2/18853: #0: ffff8880649b2128 (&ctx->uring_lock){+.+.}-{3:3}, at: __do_sys_io_uring_enter+0xe9f/0x1d50 fs/io_uring.c:9318 #1: ffffffff8c0986e0 (fs_reclaim){+.+.}-{0:0}, at: fs_reclaim_acquire+0xf7/0x160 mm/page_alloc.c:4399 #2: ffffffff8c0b5100 (mmu_notifier_invalidate_range_start){+.+.}-{0:0}, at: fs_reclaim_acquire+0xb2/0x160 mm/page_alloc.c:4390 #3: ffffc90000007d70 ((&sk->sk_timer)#2){+.-.}-{0:0}, at: lockdep_copy_map include/linux/lockdep.h:35 [inline] #3: ffffc90000007d70 ((&sk->sk_timer)#2){+.-.}-{0:0}, at: call_timer_fn+0xd5/0x6b0 kernel/time/timer.c:1421 stack backtrace: CPU: 0 PID: 18853 Comm: syz-executor.2 Not tainted 5.13.0-rc3-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:3820 [inline] mark_lock_irq kernel/locking/lockdep.c:4023 [inline] mark_lock.cold+0x61/0x8e kernel/locking/lockdep.c:4480 mark_usage kernel/locking/lockdep.c:4375 [inline] __lock_acquire+0x11aa/0x5230 kernel/locking/lockdep.c:4856 lock_acquire kernel/locking/lockdep.c:5512 [inline] lock_acquire+0x1ab/0x740 kernel/locking/lockdep.c:5477 __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_spin_unlock_irq include/linux/spinlock_api_smp.h:169 [inline] RIP: 0010:_raw_spin_unlock_irq+0x25/0x40 kernel/locking/spinlock.c:199 Code: 0f 1f 44 00 00 55 48 8b 74 24 08 48 89 fd 48 83 c7 18 e8 2e a1 41 f8 48 89 ef e8 c6 19 42 f8 e8 21 0e 62 f8 fb bf 01 00 00 00 a6 0f 36 f8 65 8b 05 4f 15 e9 76 85 c0 74 02 5d c3 e8 0b 6b e7 RSP: 0018:ffffc90002eb78b8 EFLAGS: 00000202 RAX: 00000000000045d3 RBX: 0000000000000001 RCX: 1ffffffff2045d02 RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000001 RBP: ffff8880b9c35240 R08: 0000000000000001 R09: ffffffff902268b7 R10: 0000000000000001 R11: 0000000000000000 R12: ffff8880b9c35240 R13: ffff88806cc51c40 R14: 0000000000000000 R15: ffff888019573880 finish_lock_switch kernel/sched/core.c:4093 [inline] finish_task_switch.isra.0+0x15d/0x810 kernel/sched/core.c:4210 context_switch kernel/sched/core.c:4342 [inline] __schedule+0x91e/0x23e0 kernel/sched/core.c:5147 preempt_schedule_irq+0x4e/0x90 kernel/sched/core.c:5535 irqentry_exit+0x31/0x80 kernel/entry/common.c:426 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:647 RIP: 0010:lock_acquire+0x1ef/0x740 kernel/locking/lockdep.c:5480 Code: 75 a7 7e 83 f8 01 0f 85 ee 03 00 00 9c 58 f6 c4 02 0f 85 d9 03 00 00 48 83 7c 24 08 00 74 01 fb 48 b8 00 00 00 00 00 fc ff df <48> 01 c3 48 c7 03 00 00 00 00 48 c7 43 08 00 00 00 00 48 8b 84 24 RSP: 0018:ffffc90002eb7ac0 EFLAGS: 00000206 RAX: dffffc0000000000 RBX: 1ffff920005d6f5a RCX: ffffffff815a3437 RDX: 1ffff110032ae84e RSI: 0000000000000000 RDI: 0000000000000000 RBP: 0000000000000001 R08: 0000000000000000 R09: ffffffff902268b7 R10: fffffbfff2044d16 R11: 0000000000000000 R12: 0000000000000000 R13: ffffffff8c0b5100 R14: 0000000000000000 R15: 0000000000000000 fs_reclaim_acquire mm/page_alloc.c:4394 [inline] fs_reclaim_acquire+0xd2/0x160 mm/page_alloc.c:4385 might_alloc include/linux/sched/mm.h:198 [inline] slab_pre_alloc_hook mm/slab.h:497 [inline] kmem_cache_alloc_bulk+0x2a/0x380 mm/slub.c:3314 io_alloc_req fs/io_uring.c:1707 [inline] io_submit_sqes+0x12c7/0x6bd0 fs/io_uring.c:6721 __do_sys_io_uring_enter+0xeaf/0x1d50 fs/io_uring.c:9319 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x4665d9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 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 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fc608027188 EFLAGS: 00000246 ORIG_RAX: 00000000000001aa RAX: ffffffffffffffda RBX: 000000000056bf80 RCX: 00000000004665d9 RDX: 0000000000000000 RSI: 0000000000000302 RDI: 0000000000000005 RBP: 00000000004bfcb9 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000056bf80 R13: 00007fff709475af R14: 00007fc608027300 R15: 0000000000022000