提交 906a8c3f 编写于 作者: P Pavel Begunkov 提交者: Jens Axboe

io_uring: fix punting req w/o grabbed env

It's not enough to check for REQ_F_WORK_INITIALIZED and punt async
assuming that io_req_work_grab_env() was called, it may not have been.
E.g. io_close_prep() and personality path set the flag without further
async init.

As a quick fix, always pass next work through io_req_task_queue().
Signed-off-by: NPavel Begunkov <asml.silence@gmail.com>
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 8ef77766
......@@ -1766,12 +1766,8 @@ static void io_free_req(struct io_kiocb *req)
io_req_find_next(req, &nxt);
__io_free_req(req);
if (nxt) {
if (nxt->flags & REQ_F_WORK_INITIALIZED)
io_queue_async_work(nxt);
else
io_req_task_queue(nxt);
}
if (nxt)
io_req_task_queue(nxt);
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册