summaryrefslogtreecommitdiffstats
path: root/io_uring
diff options
context:
space:
mode:
authorPavel Begunkov <asml.silence@gmail.com>2023-04-13 15:28:05 +0100
committerJens Axboe <axboe@kernel.dk>2023-04-15 14:44:57 -0600
commit953c37e066f05a3dca2d74643574b8dfe8a83983 (patch)
treece4157445ecad4615751d4820b5c0096d9b1c7d4 /io_uring
parent519760df251bf2dcafb0af23df0229096537e78a (diff)
downloadlinux-stable-953c37e066f05a3dca2d74643574b8dfe8a83983.tar.gz
linux-stable-953c37e066f05a3dca2d74643574b8dfe8a83983.tar.bz2
linux-stable-953c37e066f05a3dca2d74643574b8dfe8a83983.zip
io_uring/rsrc: use nospec'ed indexes
We use array_index_nospec() for registered buffer indexes, but don't use it while poking into rsrc tags, fix that. Fixes: 634d00df5e1cf ("io_uring: add full-fledged dynamic buffers support") Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/f02fafc5a9c0dd69be2b0618c38831c078232ff0.1681395792.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'io_uring')
-rw-r--r--io_uring/rsrc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/io_uring/rsrc.c b/io_uring/rsrc.c
index 11058e20bdcc..3c1538b8c8f4 100644
--- a/io_uring/rsrc.c
+++ b/io_uring/rsrc.c
@@ -517,7 +517,7 @@ static int __io_sqe_buffers_update(struct io_ring_ctx *ctx,
}
ctx->user_bufs[i] = imu;
- *io_get_tag_slot(ctx->buf_data, offset) = tag;
+ *io_get_tag_slot(ctx->buf_data, i) = tag;
}
if (needs_switch)