rust: lockdep: Remove support for dynamically allocated LockClassKeys
authorMitchell Levy <levymitchell0@gmail.com>
Fri, 7 Mar 2025 23:27:00 +0000 (15:27 -0800)
committerIngo Molnar <mingo@kernel.org>
Fri, 7 Mar 2025 23:52:00 +0000 (00:52 +0100)
commit966944f3711665db13e214fef6d02982c49bb972
treec4881bf8c351f08eceb06a3894c626d173c9ad1d
parent21e4543a2e2f8538373d1d19264c4bae6f13e798
rust: lockdep: Remove support for dynamically allocated LockClassKeys

Currently, dynamically allocated LockCLassKeys can be used from the Rust
side without having them registered. This is a soundness issue, so
remove them.

Fixes: 6ea5aa08857a ("rust: sync: introduce `LockClassKey`")
Suggested-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Mitchell Levy <levymitchell0@gmail.com>
Signed-off-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250307232717.1759087-11-boqun.feng@gmail.com
rust/kernel/sync.rs