============================= [ BUG: Invalid wait context ] 6.13.0-rc1-syzkaller #0 Not tainted ----------------------------- kworker/u8:1/13 is trying to lock: ffff8881067a7820 (&ctx->wqh){....}-{3:3}, at: eventfd_signal_mask+0x32/0xa0 fs/eventfd.c:71 other info that might help us debug this: context-{5:5} 6 locks held by kworker/u8:1/13: #0: ffff888102294948 ((wq_completion)iou_exit){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3204 [inline] #0: ffff888102294948 ((wq_completion)iou_exit){+.+.}-{0:0}, at: process_scheduled_works+0x246/0x5c0 kernel/workqueue.c:3310 #1: ffffc90000073e58 ((work_completion)(&ctx->exit_work)){+.+.}-{0:0}, at: process_one_work kernel/workqueue.c:3205 [inline] #1: ffffc90000073e58 ((work_completion)(&ctx->exit_work)){+.+.}-{0:0}, at: process_scheduled_works+0x266/0x5c0 kernel/workqueue.c:3310 #2: ffff88810535c3d8 (&ctx->completion_lock){+.+.}-{3:3}, at: spin_lock include/linux/spinlock.h:351 [inline] #2: ffff88810535c3d8 (&ctx->completion_lock){+.+.}-{3:3}, at: io_kill_timeouts+0x28/0xd0 io_uring/timeout.c:670 #3: ffff88810535c358 (&ctx->timeout_lock){....}-{2:2}, at: io_kill_timeouts+0x37/0xd0 io_uring/timeout.c:671 #4: ffffffff835dd858 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #4: ffffffff835dd858 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #4: ffffffff835dd858 (rcu_read_lock){....}-{1:3}, at: class_rcu_constructor include/linux/rcupdate.h:1161 [inline] #4: ffffffff835dd858 (rcu_read_lock){....}-{1:3}, at: io_req_local_work_add+0x21/0x190 io_uring/io_uring.c:1157 #5: ffffffff835dd858 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #5: ffffffff835dd858 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #5: ffffffff835dd858 (rcu_read_lock){....}-{1:3}, at: io_eventfd_grab+0x23/0x1d0 io_uring/eventfd.c:97 stack backtrace: CPU: 0 UID: 0 PID: 13 Comm: kworker/u8:1 Not tainted 6.13.0-rc1-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Workqueue: iou_exit io_ring_exit_work Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xa3/0x100 lib/dump_stack.c:120 print_lock_invalid_wait_context kernel/locking/lockdep.c:4826 [inline] check_wait_context kernel/locking/lockdep.c:4898 [inline] __lock_acquire+0xc89/0x2570 kernel/locking/lockdep.c:5176 lock_acquire+0xeb/0x270 kernel/locking/lockdep.c:5849 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x61/0xa0 kernel/locking/spinlock.c:162 eventfd_signal_mask+0x32/0xa0 fs/eventfd.c:71 __io_eventfd_signal io_uring/eventfd.c:65 [inline] io_eventfd_signal+0x31/0x90 io_uring/eventfd.c:123 io_req_local_work_add+0x108/0x190 io_uring/io_uring.c:1198 io_req_task_work_add io_uring/io_uring.h:149 [inline] io_req_queue_tw_complete io_uring/io_uring.h:451 [inline] io_kill_timeout+0xa3/0xc0 io_uring/timeout.c:101 io_kill_timeouts+0x80/0xd0 io_uring/timeout.c:676 io_uring_try_cancel_requests+0x1c6/0x200 io_uring/io_uring.c:3113 io_ring_exit_work+0xd1/0x2b0 io_uring/io_uring.c:2897 process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0x2ab/0x5c0 kernel/workqueue.c:3310 worker_thread+0x23e/0x2e0 kernel/workqueue.c:3391 kthread+0xea/0x100 kernel/kthread.c:389 ret_from_fork+0x32/0x40 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244