Skip to content

Commit

Permalink
io_uring: fix mshot read defer taskrun cqe posting
Browse files Browse the repository at this point in the history
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.

Cc: stable@vger.kernel.org
Fixes: fc68fcd ("io_uring/rw: add support for IORING_OP_READ_MULTISHOT")
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/6fb7cba6f5366da25f4d3eb95273f062309d97fa.1709740837.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
isilence authored and axboe committed Mar 7, 2024
1 parent 8ede3db commit 70581dc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions io_uring/rw.c
Original file line number Diff line number Diff line change
Expand Up @@ -933,6 +933,8 @@ int io_read_mshot(struct io_kiocb *req, unsigned int issue_flags)
*/
if (!io_file_can_poll(req))
return -EBADFD;
if (issue_flags & IO_URING_F_IOWQ)
return -EAGAIN;

ret = __io_read(req, issue_flags);

Expand Down

0 comments on commit 70581dc

Please sign in to comment.