umber-kernel/drivers/android/binder
Carlos Llamas 287221c5e0 rust_binderfs: fix ida_alloc_max() upper bound
commit d6ba734814266bbf7ee01f9030436597116805f3 upstream.

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@vger.kernel.org
Fixes: eafedbc7c0 ("rust_binder: add Rust Binder driver")
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/r/202512181203.IOv6IChH-lkp@intel.com/
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20260127235545.2307876-1-cmllamas@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-02-11 13:41:45 +01:00
..
node
range_alloc
Makefile
allocation.rs
context.rs
deferred_close.rs
defs.rs
error.rs
freeze.rs rust_binder: report freeze notification only when fully frozen 2025-10-13 11:06:20 +02:00
node.rs rust_binder: fix race condition on death_list 2025-12-12 18:42:45 +01:00
page_range.rs rust_binder: remove spin_lock() in rust_shrink_free_page() 2026-01-17 16:35:11 +01:00
page_range_helper.c
page_range_helper.h
process.rs rust_binder: avoid mem::take on delivered_deaths 2026-01-02 12:57:05 +01:00
rust_binder.h
rust_binder_events.c
rust_binder_events.h
rust_binder_internal.h
rust_binder_main.rs
rust_binderfs.c rust_binderfs: fix ida_alloc_max() upper bound 2026-02-11 13:41:45 +01:00
stats.rs
thread.rs rust_binder: add additional alignment checks 2026-02-11 13:41:45 +01:00
trace.rs
transaction.rs rust_binder: report freeze notification only when fully frozen 2025-10-13 11:06:20 +02:00