Skip to content

Commit 953c37e

Browse files
isilenceaxboe
authored andcommitted
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: 634d00d ("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>
1 parent 519760d commit 953c37e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

io_uring/rsrc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ static int __io_sqe_buffers_update(struct io_ring_ctx *ctx,
517517
}
518518

519519
ctx->user_bufs[i] = imu;
520-
*io_get_tag_slot(ctx->buf_data, offset) = tag;
520+
*io_get_tag_slot(ctx->buf_data, i) = tag;
521521
}
522522

523523
if (needs_switch)

0 commit comments

Comments
 (0)