summaryrefslogtreecommitdiff
path: root/io_uring
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2024-03-06 19:02:25 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-04-03 16:32:15 +0300
commitd6b6e94e1128306f5e80a8baf1feda47421e91f3 (patch)
tree4edc95f5b29c423d62b82c1be7d0e6cb63a83f97 /io_uring
parent6afa86eb39ef6181c3a3cb8fb1206b4707e0f02e (diff)
downloadlinux-d6b6e94e1128306f5e80a8baf1feda47421e91f3.tar.xz
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@vger.kernel.org Fixes: fc68fcda04910 ("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> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'io_uring')
-rw-r--r--io_uring/rw.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/io_uring/rw.c b/io_uring/rw.c
index d5e79d9bdc71..8756e367acd9 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);