summaryrefslogtreecommitdiff
path: root/rust/kernel/debugfs
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@kernel.org>2025-11-07 10:16:07 +0100
committerDanilo Krummrich <dakr@kernel.org>2025-11-07 22:53:11 +0100
commit0bc605713f16ad77e0a3f30f992aa3794c381372 (patch)
tree1c3f50ac046608fd1adc0a7d1aedbaa97e7dcc0f /rust/kernel/debugfs
parentb892ed360de8227d700ef010b08564f87ad3a7ce (diff)
rust: debugfs: Implement BinaryReader for Mutex<T> only when T is Unpin
Commit da123f0ee40f ("rust: lock: guard: Add T: Unpin bound to DerefMut") from tip/master adds an Unpin bound to T for Mutex<T>, hence also restrict the implementation of BinaryReader for Mutex<T> accordingly. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Closes: https://lore.kernel.org/all/20251107134144.117905bd@canb.auug.org.au/ Reviewed-by: Alice Ryhl <aliceryhl@google.com> Link: https://patch.msgid.link/20251107091612.2557480-1-dakr@kernel.org Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'rust/kernel/debugfs')
-rw-r--r--rust/kernel/debugfs/traits.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/kernel/debugfs/traits.rs b/rust/kernel/debugfs/traits.rs
index 2c32ddf9826f..82441ac8adaa 100644
--- a/rust/kernel/debugfs/traits.rs
+++ b/rust/kernel/debugfs/traits.rs
@@ -257,7 +257,7 @@ pub trait BinaryReader {
}
// Delegate for `Mutex<T>`: Support a `T` with an outer `Mutex`.
-impl<T: BinaryReaderMut> BinaryReader for Mutex<T> {
+impl<T: BinaryReaderMut + Unpin> BinaryReader for Mutex<T> {
fn read_from_slice(
&self,
reader: &mut UserSliceReader,