Files
erofs-linux/lib
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/[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]>
2025-12-23 11:23:11 -08:00
..
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-10-24 21:39:27 +02:00
…
…
…
…
…
…
…
…
…
…
2025-11-27 14:24:30 -08:00
…
…
…
…
…
…
…
…
…
…
…
…
…
…
2025-09-13 16:54:46 -07:00