io_uring: nospec index for tags on files update
[ Upstream commit34bb771841
] Don't forget to array_index_nospec() for indexes before updating rsrc tags in __io_sqe_files_update(), just use already safe and precalculated index @i. Fixes:c3bdad0271
("io_uring: add generic rsrc update with tags") Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Родитель
685f42de44
Коммит
50c981bd77
|
@ -8589,7 +8589,7 @@ static int __io_sqe_files_update(struct io_ring_ctx *ctx,
|
|||
err = -EBADF;
|
||||
break;
|
||||
}
|
||||
*io_get_tag_slot(data, up->offset + done) = tag;
|
||||
*io_get_tag_slot(data, i) = tag;
|
||||
io_fixed_file_set(file_slot, file);
|
||||
err = io_sqe_file_register(ctx, file, i);
|
||||
if (err) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче