Skip to content

Commit 70581dc

Browse files
isilenceaxboe
authored andcommitted
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. 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>
1 parent 8ede3db commit 70581dc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

io_uring/rw.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -933,6 +933,8 @@ int io_read_mshot(struct io_kiocb *req, unsigned int issue_flags)
933933
*/
934934
if (!io_file_can_poll(req))
935935
return -EBADFD;
936+
if (issue_flags & IO_URING_F_IOWQ)
937+
return -EAGAIN;
936938

937939
ret = __io_read(req, issue_flags);
938940

0 commit comments

Comments
 (0)