mirror of
https://github.com/torvalds/linux.git
synced 2026-11-20 21:12:43 +00:00
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/[email protected]
Fixes: 6ce711f275 ("idr: Make 1-based IDRs more efficient")
Signed-off-by: Matthew Wilcox (Oracle) <[email protected]>
Reported-by: Jan Sokolowski <[email protected]>
Reported-by: Koen Koning <[email protected]>
Reported-by: Peter Senna Tschudin <[email protected]>
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/6449
Reviewed-by: Christian König <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>