io_uring: nospec index for tags on files update
authorPavel Begunkov <asml.silence@gmail.com>
Wed, 6 Apr 2022 11:43:57 +0000 (12:43 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Apr 2022 18:03:17 +0000 (20:03 +0200)
commit03a0b9cf7afcb568336d1dc89763395538d27d48
tree7937ec2e8674e00e63a0b6e8a1c29ce4cd5dfb3d
parent7a3767065a474ace9e86146657a98c6a47a48655
io_uring: nospec index for tags on files update

[ Upstream commit 34bb77184123ae401100a4d156584f12fa630e5c ]

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: c3bdad0271834 ("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>
fs/io_uring.c