projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
519760d
)
io_uring/rsrc: use nospec'ed indexes
author
Pavel Begunkov
<asml.silence@gmail.com>
Thu, 13 Apr 2023 14:28:05 +0000
(15:28 +0100)
committer
Jens Axboe
<axboe@kernel.dk>
Sat, 15 Apr 2023 20:44:57 +0000
(14:44 -0600)
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>
io_uring/rsrc.c
patch
|
blob
|
history
diff --git
a/io_uring/rsrc.c
b/io_uring/rsrc.c
index 11058e20bdcc564a96478ebefce180565760de6a..3c1538b8c8f409ed36dcbb2f01e6f28ed63bc56b 100644
(file)
--- 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)