linux/rust/kernel/sync
Alice Ryhl 1d24eb2d53 rust: delete ForeignOwnable::borrow_mut
We discovered that the current design of `borrow_mut` is problematic.
This patch removes it until a better solution can be found.

Specifically, the current design gives you access to a `&mut T`, which
lets you change where the `ForeignOwnable` points (e.g., with
`core::mem::swap`). No upcoming user of this API intended to make that
possible, making all of them unsound.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Gary Guo <gary@garyguo.net>
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Fixes: 0fc4424d24 ("rust: types: introduce `ForeignOwnable`")
Link: https://lore.kernel.org/r/20230706094615.3080784-1-aliceryhl@google.com
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2023-08-04 17:10:50 +02:00
..
arc rust: sync: arc: Implement Arc<dyn Any + Send + Sync>::downcast() 2023-04-10 23:55:43 +02:00
lock rust: lock: add Guard::do_unlocked 2023-04-22 01:46:30 +02:00
arc.rs rust: delete ForeignOwnable::borrow_mut 2023-08-04 17:10:50 +02:00
condvar.rs rust: sync: introduce CondVar 2023-04-22 01:46:45 +02:00
lock.rs rust: sync: introduce CondVar 2023-04-22 01:46:45 +02:00
locked_by.rs rust: sync: introduce LockedBy 2023-04-22 00:20:00 +02:00