================================ WARNING: inconsistent lock state 5.16.0-rc2-syzkaller #0 Not tainted -------------------------------- inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-W} usage. syz-fuzzer/6513 [HC1[1]:SC0[0]:HE0:SE1] takes: ffff88802e50d418 (&ctx->timeout_lock){?.+.}-{2:2}, at: io_timeout_fn+0x6f/0x360 fs/io_uring.c:5943 {HARDIRQ-ON-W} state was registered at: __trace_hardirqs_on_caller kernel/locking/lockdep.c:4224 [inline] lockdep_hardirqs_on_prepare kernel/locking/lockdep.c:4292 [inline] lockdep_hardirqs_on_prepare+0x135/0x400 kernel/locking/lockdep.c:4244 trace_hardirqs_on+0x5b/0x1c0 kernel/trace/trace_preemptirq.c:49 __raw_spin_unlock_irq include/linux/spinlock_api_smp.h:159 [inline] _raw_spin_unlock_irq+0x1f/0x40 kernel/locking/spinlock.c:202 spin_unlock_irq include/linux/spinlock.h:399 [inline] __io_poll_remove_one fs/io_uring.c:5669 [inline] __io_poll_remove_one fs/io_uring.c:5654 [inline] io_poll_remove_one+0x514/0x870 fs/io_uring.c:5680 io_poll_remove_all+0x1af/0x235 fs/io_uring.c:5709 io_ring_ctx_wait_and_kill+0x1cc/0x322 fs/io_uring.c:9534 io_uring_release+0x42/0x46 fs/io_uring.c:9554 __fput+0x286/0x9f0 fs/file_table.c:280 task_work_run+0xdd/0x1a0 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:175 [inline] exit_to_user_mode_prepare+0x27e/0x290 kernel/entry/common.c:207 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline] syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae irq event stamp: 4195884 hardirqs last enabled at (4195883): [] asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638 hardirqs last disabled at (4195884): [] irqentry_enter+0x45/0x50 kernel/entry/common.c:325 softirqs last enabled at (4195872): [] restore_fpregs_from_user arch/x86/kernel/fpu/signal.c:326 [inline] softirqs last enabled at (4195872): [] __fpu_restore_sig+0x3f8/0x1380 arch/x86/kernel/fpu/signal.c:361 softirqs last disabled at (4195870): [] pagefault_disabled_inc include/linux/uaccess.h:219 [inline] softirqs last disabled at (4195870): [] pagefault_disable include/linux/uaccess.h:236 [inline] softirqs last disabled at (4195870): [] restore_fpregs_from_user arch/x86/kernel/fpu/signal.c:287 [inline] softirqs last disabled at (4195870): [] __fpu_restore_sig+0x1f7/0x1380 arch/x86/kernel/fpu/signal.c:361 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&ctx->timeout_lock); lock(&ctx->timeout_lock); *** DEADLOCK *** no locks held by syz-fuzzer/6513. stack backtrace: CPU: 0 PID: 6513 Comm: syz-fuzzer Not tainted 5.16.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_usage_bug kernel/locking/lockdep.c:203 [inline] valid_state kernel/locking/lockdep.c:3945 [inline] mark_lock_irq kernel/locking/lockdep.c:4148 [inline] mark_lock.cold+0x61/0x8e kernel/locking/lockdep.c:4605 mark_usage kernel/locking/lockdep.c:4497 [inline] __lock_acquire+0x149d/0x54a0 kernel/locking/lockdep.c:4981 lock_acquire kernel/locking/lockdep.c:5637 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5602 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:162 io_timeout_fn+0x6f/0x360 fs/io_uring.c:5943 __run_hrtimer kernel/time/hrtimer.c:1685 [inline] __hrtimer_run_queues+0x609/0xe50 kernel/time/hrtimer.c:1749 hrtimer_interrupt+0x31c/0x790 kernel/time/hrtimer.c:1811 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1086 [inline] __sysvec_apic_timer_interrupt+0x146/0x530 arch/x86/kernel/apic/apic.c:1103 sysvec_apic_timer_interrupt+0x40/0xc0 arch/x86/kernel/apic/apic.c:1097 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:638 RIP: 0033:0x40daa9 Code: 07 90 41 d1 e2 45 0f b6 d9 45 09 da 41 0f b6 c2 48 3d 86 00 00 00 0f 83 b9 02 00 00 48 8b 44 c7 28 48 89 44 24 30 4c 8b 58 40 <4d> 0f bc e3 41 bd 40 00 00 00 4d 0f 44 e5 66 0f 1f 84 00 00 00 00 RSP: 002b:000000c01612eba0 EFLAGS: 00000287 RAX: 00007f7830a246d8 RBX: 00000000018650a0 RCX: 000000c000001b00 RDX: 0000000000000020 RSI: 0000000000000000 RDI: 00007f785824b7d0 RBP: 000000c01612ec30 R08: 0000000000000000 R09: 0000000000000001 R10: 0000000000000007 R11: 0000000000000000 R12: 0000000000000028 R13: 0000000000000000 R14: 00000000008db709 R15: 0000000000000000