------------[ cut here ]------------ test_bit(IO_SQ_THREAD_SHOULD_STOP, &sqd->state) WARNING: io_uring/sqpoll.c:88 at io_sq_thread_stop+0x17e/0x1a0 io_uring/sqpoll.c:88, CPU#0: kworker/u4:6/182 Modules linked in: CPU: 0 UID: 0 PID: 182 Comm: kworker/u4:6 Not tainted syzkaller #0 PREEMPT(full) Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2 04/01/2014 Workqueue: iou_exit io_ring_exit_work RIP: 0010:io_sq_thread_stop+0x17e/0x1a0 io_uring/sqpoll.c:88 Code: c6 05 e5 fe be 0c 01 48 c7 c7 e0 5f 8c 8c be 26 00 00 00 48 c7 c2 20 60 8c 8c e8 4d ee bb fc e9 4f ff ff ff e8 a3 ad e0 fc 90 <0f> 0b 90 e9 e1 fe ff ff e8 95 ad e0 fc 90 0f 0b 90 e9 6e ff ff ff RSP: 0018:ffffc90001a57890 EFLAGS: 00010293 RAX: ffffffff84e874cd RBX: ffff88801429f400 RCX: ffff8880349bcb00 RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000 RBP: 0000000000000000 R08: ffff88801429f51f R09: 1ffff11002853ea3 R10: dffffc0000000000 R11: ffffed1002853ea4 R12: 0000000000000001 R13: 0000000000000000 R14: ffff88801429f518 R15: dffffc0000000000 FS: 0000000000000000(0000) GS:ffff88808a9fa000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f316485c9a0 CR3: 0000000013867000 CR4: 0000000000352ef0 Call Trace: io_put_sq_data+0x8a/0x150 io_uring/sqpoll.c:105 io_sq_thread_finish+0x1fd/0x240 io_uring/sqpoll.c:130 io_ring_ctx_free+0x2d/0x5f0 io_uring/io_uring.c:2322 io_ring_exit_work+0x5b4/0x650 io_uring/io_uring.c:2658 process_one_work kernel/workqueue.c:3495 [inline] process_scheduled_works+0xc3d/0x1630 kernel/workqueue.c:3578 worker_thread+0xa47/0xfb0 kernel/workqueue.c:3659 kthread+0x38b/0x480 kernel/kthread.c:436 ret_from_fork+0x514/0xb70 arch/x86/kernel/process.c:158 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:245