--- x/io_uring/io-wq.c +++ y/io_uring/io-wq.c @@ -1224,12 +1224,15 @@ void io_wq_exit_start(struct io_wq *wq) static void io_wq_cancel_tw_create(struct io_wq *wq) { struct callback_head *cb; + struct task_struct *me = current; while ((cb = task_work_cancel_match(wq->task, io_task_work_match, wq)) != NULL) { struct io_worker *worker; worker = container_of(cb, struct io_worker, create_work); io_worker_cancel_cb(worker); + if (worker->task == me) + continue; kfree(worker); } }