This is a note to let you know that I've just added the patch titled io_uring: fix mshot read defer taskrun cqe posting to the 6.8-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: io_uring-fix-mshot-read-defer-taskrun-cqe-posting.patch and it can be found in the queue-6.8 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit a2cb7c945be6ee7810fafbd2efe9f915a96ff91d Author: Pavel Begunkov <asml.silence@xxxxxxxxx> Date: Wed Mar 6 16:02:25 2024 +0000 io_uring: fix mshot read defer taskrun cqe posting [ Upstream commit 70581dcd0601a09f134f23268e3374e15d736824 ] 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@xxxxxxxxxxxxxxx Fixes: fc68fcda04910 ("io_uring/rw: add support for IORING_OP_READ_MULTISHOT") Signed-off-by: Pavel Begunkov <asml.silence@xxxxxxxxx> Link: https://lore.kernel.org/r/6fb7cba6f5366da25f4d3eb95273f062309d97fa.1709740837.git.asml.silence@xxxxxxxxx Signed-off-by: Jens Axboe <axboe@xxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/io_uring/rw.c b/io_uring/rw.c index d5e79d9bdc717..8756e367acd91 100644 --- a/io_uring/rw.c +++ b/io_uring/rw.c @@ -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);