Re: [PATCH v5 7/7] rust: alloc: add Vec::insert_within_capacity

Benno Lossin
2025-05-07T11:46:53Z

On Fri May 2, 2025 at 3:19 PM CEST, Alice Ryhl wrote:
> This adds a variant of Vec::insert that does not allocate memory. This
> makes it safe to use this function while holding a spinlock. Rust Binder
> uses it for the range allocator fast path.
>
> Signed-off-by: Alice Ryhl <aliceryhl@google.com>

Reviewed-by: Benno Lossin <lossin@kernel.org>

---
Cheers,
Benno

> ---
> rust/kernel/alloc/kvec.rs | 51 +++++++++++++++++++++++++++++++++++++++-
> rust/kernel/alloc/kvec/errors.rs | 23 ++++++++++++++++++
> 2 files changed, 73 insertions(+), 1 deletion(-)