Re: [PATCH 1/2] rust: Add initial cpumask abstractions
From: Viresh Kumar
Date: Tue Feb 25 2025 - 12:02:47 EST
On Tue, 25 Feb 2025 at 17:23, Alice Ryhl <aliceryhl@xxxxxxxxxx> wrote:
> Is it a problem if a value of type struct cpumask is moved? It looks
> like it is just an array of longs?
With the current code, if I replace the Box with an on-stack variable,
the kernel crashes.
In my usecase, the pointer to the cpumask array is sent to the OPP
core, which may update the content, though it doesn't save the pointer.
But for another usecase, the C code may end up saving the pointer.
--
Viresh