Re: [PATCH 1/2] rust_binderfs: fix ida_alloc_max() upper bound

From: Alice Ryhl

Date: Wed Jan 28 2026 - 04:19:21 EST


On Tue, Jan 27, 2026 at 11:55:10PM +0000, Carlos Llamas wrote:
> The 'max' argument of ida_alloc_max() takes the maximum valid ID and not
> the "count". Using an ID of BINDERFS_MAX_MINOR (1 << 20) for dev->minor
> would exceed the limits of minor numbers (20-bits). Fix this off-by-one
> error by subtracting 1 from the 'max'.
>
> Cc: stable@xxxxxxxxxxxxxxx
> Fixes: eafedbc7c050 ("rust_binder: add Rust Binder driver")
> Reported-by: kernel test robot <lkp@xxxxxxxxx>
> Closes: https://lore.kernel.org/r/202512181203.IOv6IChH-lkp@xxxxxxxxx/
> Signed-off-by: Carlos Llamas <cmllamas@xxxxxxxxxx>

For both patches:
Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>