summaryrefslogtreecommitdiff
path: root/include/net/aligned_data.h
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2026-02-11 15:12:03 -0700
committerSasha Levin <sashal@kernel.org>2026-03-04 07:21:56 -0500
commit5cfc202825bacaec4727864aa301e750d49ae6f6 (patch)
treeb58fc60c67cdffc16966a0817f713b1981483212 /include/net/aligned_data.h
parent74f7e464ad88d7a0951f3f837032af36d065e04b (diff)
io_uring/filetable: clamp alloc_hint to the configured alloc range
[ Upstream commit a6bded921ed35f21b3f6bd8e629bf488499ca442 ] Explicit fixed file install/remove operations on slots outside the configured alloc range can corrupt alloc_hint via io_file_bitmap_set() and io_file_bitmap_clear(), which unconditionally update alloc_hint to the bit position. This causes subsequent auto-allocations to fall outside the configured range. For example, if the alloc range is [10, 20) and a file is removed at slot 2, alloc_hint gets set to 2. The next auto-alloc then starts searching from slot 2, potentially returning a slot below the range. Fix this by clamping alloc_hint to [file_alloc_start, file_alloc_end) at the top of io_file_bitmap_get() before starting the search. Cc: stable@vger.kernel.org Fixes: 6e73dffbb93c ("io_uring: let to set a range for file slot allocation") Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/net/aligned_data.h')
0 files changed, 0 insertions, 0 deletions