]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
io_uring/tctx: avoid modifying loop variable in io_ring_add_registered_file
authorYang Xiuwei <yangxiuwei@kylinos.cn>
Tue, 10 Feb 2026 02:34:32 +0000 (10:34 +0800)
committerJens Axboe <axboe@kernel.dk>
Tue, 10 Feb 2026 03:12:46 +0000 (20:12 -0700)
commitdaa0b901f8319414cf9f56237f15240b95e4b1b2
tree8cf5feeb9830b95e94448b2837c8842d77255668
parent7cb3a68376da0bc0afab8157223cb479c97de9ff
io_uring/tctx: avoid modifying loop variable in io_ring_add_registered_file

Use a separate 'idx' variable to store the result of array_index_nospec()
instead of modifying the loop variable 'offset' directly. This improves
code clarity by separating the logical index from the sanitized index
used for array access.

No functional change intended.

Signed-off-by: Yang Xiuwei <yangxiuwei@kylinos.cn>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/tctx.c