]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rust: cpumask: Mark CpumaskVar as transparent
authorBaptiste Lepers <baptiste.lepers@gmail.com>
Tue, 12 Aug 2025 14:42:11 +0000 (16:42 +0200)
committerViresh Kumar <viresh.kumar@linaro.org>
Thu, 14 Aug 2025 04:25:47 +0000 (09:55 +0530)
commit23fca458f6ab18927e50c2134fb7b60297f18b4e
tree47c6866ce7fcd8401fa83a69d12636e46b259b95
parentdaad2ef99145215fac1cab196811e3e03ef8bc9f
rust: cpumask: Mark CpumaskVar as transparent

Unsafe code in CpumaskVar's methods assumes that the type has the same
layout as `bindings::cpumask_var_t`. This is not guaranteed by
the default struct representation in Rust, but requires specifying the
`transparent` representation.

Fixes: 8961b8cb3099a ("rust: cpumask: Add initial abstractions")
Signed-off-by: Baptiste Lepers <baptiste.lepers@gmail.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
rust/kernel/cpumask.rs