mirror-linux/tools/testing/radix-tree
Matthew Wilcox (Oracle) c6e8e595a0 idr: fix idr_alloc() returning an ID out of range
If you use an IDR with a non-zero base, and specify a range that lies
entirely below the base, 'max - base' becomes very large and
idr_get_free() can return an ID that lies outside of the requested range.

Link: https://lkml.kernel.org/r/20251128161853.3200058-1-willy@infradead.org
Fixes: 6ce711f275 ("idr: Make 1-based IDRs more efficient")
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reported-by: Jan Sokolowski <jan.sokolowski@intel.com>
Reported-by: Koen Koning <koen.koning@intel.com>
Reported-by: Peter Senna Tschudin <peter.senna@linux.intel.com>
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/6449
Reviewed-by: Christian König <christian.koenig@amd.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2025-12-23 11:23:11 -08:00
..
.gitignore tools: separate out shared radix-tree components 2024-09-01 20:25:55 -07:00
Makefile xarray: add xas_try_split() to split a multi-index entry 2025-03-17 22:06:59 -07:00
benchmark.c
idr-test.c idr: fix idr_alloc() returning an ID out of range 2025-12-23 11:23:11 -08:00
iteration_check.c
iteration_check_2.c
main.c
maple.c Summary of significant series in this pull request: 2025-10-02 18:18:33 -07:00
multiorder.c Xarray: do not return sibling entries from xas_find_marked() 2025-01-24 22:47:27 -08:00
regression.h
regression1.c radix tree test suite: fix incorrect allocation size for pthreads 2023-08-04 13:03:40 -07:00
regression2.c
regression3.c
regression4.c
tag_check.c
test.c
test.h radix tree test suite: Fix compilation 2020-10-07 09:07:49 -04:00
xarray.c tools: separate out shared radix-tree components 2024-09-01 20:25:55 -07:00