io_uring: fix mshot read defer taskrun cqe posting
PATCH 1/1 io_uring: fix mshot read defer taskrun cqe posting
We can't post CQEs from io-wq with DEFER_TASKRUN set, normal completions are handled but aux should be explicitly disallowed by opcode handlers.
--- io_uring/rw.c | 2 ++ 1 file changed, 2 insertions(+)
io_uring/rw.c +2 -0
@@ -932,6 +932,8 @@ int io_read_mshot(struct io_kiocb *req, unsigned int issue_flags)*/ if (!file_can_poll (req->file))return -EBADFD ; +if (issue_flags &IO_URING_F_IOWQ ) +return -EAGAIN ; ret =__io_read (req, issue_flags);
Signature · 1 line
2.43.0
Quoted 4 lines · Pavel Begunkov
We can't post CQEs from io-wq with
DEFER_TASKRUNset, normal completions are handled but aux should be explicitly disallowed by opcode handlers.
Applied, thanks!
[1/1] io_uring: fix mshot read defer taskrun cqe posting
(no commit info)
Best regards,
Signature · 1 line
Jens Axboe
Jens Axboe
maintainerQuoted 2 lines · Pavel Begunkov
We can't post CQEs from io-wq with
DEFER_TASKRUNset, normal completions are handled but aux should be explicitly disallowed by opcode handlers.
Looks good - but I can't help but think that it'd be nice to handle this from io_wq_submit_work() instead, and take it out of the opcode handlers themselves (like this one, and the recv/recvmsg part). That'd put it in the slow path instead.
Anyway, it's applied, as it's a real fix and any work like the above should be done separately of course.
Signature · 1 line
Jens Axboe
Quoted 8 lines · Jens Axboe
Quoted 2 lines · Pavel Begunkov
We can't post CQEs from io-wq with
DEFER_TASKRUNset, normal completions are handled but aux should be explicitly disallowed by opcode handlers.Looks good - but I can't help but think that it'd be nice to handle this from
io_wq_submit_work()instead, and take it out of the opcode handlers themselves (like this one, and the recv/recvmsg part). That'd put it in the slow path instead.
I have a follow up cleanup patch, but I like this idea even more
Quoted 2 lines
Anyway, it's applied, as it's a real fix and any work like the above should be done separately of course.
Signature · 1 line
Pavel Begunkov
Jens Axboe
maintainerQuoted 11 lines · Pavel Begunkov
Quoted 8 lines · Jens Axboe
Quoted 2 lines · Pavel Begunkov
We can't post CQEs from io-wq with
DEFER_TASKRUNset, normal completions are handled but aux should be explicitly disallowed by opcode handlers.Looks good - but I can't help but think that it'd be nice to handle this from
io_wq_submit_work()instead, and take it out of the opcode handlers themselves (like this one, and the recv/recvmsg part). That'd put it in the slow path instead.I have a follow up cleanup patch, but I like this idea even more
Excellent, looking forward to that :)
Signature · 1 line
Jens Axboe