diff options
author | Pavel Begunkov <asml.silence@gmail.com> | 2022-12-07 03:53:26 +0000 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-12-07 06:47:13 -0700 |
commit | ef0ec1ad03119b8b46b035dad42bca7d6da7c2e5 (patch) | |
tree | 27b3091d86ca96a78743410bc66d0af25329288e /io_uring/io_uring.c | |
parent | 7500194a630b11236761df35fef300009d7d3f6f (diff) | |
download | lwn-ef0ec1ad03119b8b46b035dad42bca7d6da7c2e5.tar.gz lwn-ef0ec1ad03119b8b46b035dad42bca7d6da7c2e5.zip |
io_uring: dont remove file from msg_ring reqs
We should not be messing with req->file outside of core paths. Clearing
it makes msg_ring non reentrant, i.e. luckily io_msg_send_fd() fails the
request on failed io_double_lock_ctx() but clearly was originally
intended to do retries instead.
Cc: stable@vger.kernel.org
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://lore.kernel.org/r/e5ac9edadb574fe33f6d727cb8f14ce68262a684.1670384893.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring/io_uring.c')
-rw-r--r-- | io_uring/io_uring.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/io_uring.c b/io_uring/io_uring.c index c30765579a8e..5fa92170c373 100644 --- a/io_uring/io_uring.c +++ b/io_uring/io_uring.c @@ -1799,7 +1799,7 @@ static int io_issue_sqe(struct io_kiocb *req, unsigned int issue_flags) return ret; /* If the op doesn't have a file, we're not polling for it */ - if ((req->ctx->flags & IORING_SETUP_IOPOLL) && req->file) + if ((req->ctx->flags & IORING_SETUP_IOPOLL) && def->iopoll_queue) io_iopoll_req_issued(req, issue_flags); return 0; |