diff options
author | Pavel Begunkov | 2022-12-07 03:53:26 +0000 |
---|---|---|
committer | Greg Kroah-Hartman | 2022-12-31 13:33:12 +0100 |
commit | f6a5cada4ff62dd13b92ef7d6964307fcbdf6779 (patch) | |
tree | b2f1d75c11746f94720ef3b1ae5f6c9600044df3 /io_uring/msg_ring.c | |
parent | 16225abb3cbc0d810c589541f5b9ca88003f5128 (diff) |
io_uring: dont remove file from msg_ring reqs
commit ef0ec1ad03119b8b46b035dad42bca7d6da7c2e5 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'io_uring/msg_ring.c')
-rw-r--r-- | io_uring/msg_ring.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/io_uring/msg_ring.c b/io_uring/msg_ring.c index 90d2fc6fd80e..d8aeac776438 100644 --- a/io_uring/msg_ring.c +++ b/io_uring/msg_ring.c @@ -167,9 +167,5 @@ done: if (ret < 0) req_set_fail(req); io_req_set_res(req, ret, 0); - /* put file to avoid an attempt to IOPOLL the req */ - if (!(req->flags & REQ_F_FIXED_FILE)) - io_put_file(req->file); - req->file = NULL; return IOU_OK; } |