6.7-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pavel Begunkov asml.silence@gmail.com
[ 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.170974083... Signed-off-by: Jens Axboe axboe@kernel.dk Signed-off-by: Sasha Levin sashal@kernel.org --- io_uring/rw.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/io_uring/rw.c b/io_uring/rw.c index 9394bf83e8358..f66ace04403f7 100644 --- a/io_uring/rw.c +++ b/io_uring/rw.c @@ -926,6 +926,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);