diff options
| author | Danilo Krummrich <dakr@kernel.org> | 2026-01-16 20:02:30 +0100 |
|---|---|---|
| committer | Danilo Krummrich <dakr@kernel.org> | 2026-01-16 20:03:17 +0100 |
| commit | 086714bbb96f63785da251e1f8d1ce3e716a6e42 (patch) | |
| tree | 7809e44f86e1733b60c820b9c892876298a446d7 /rust/kernel/maple_tree.rs | |
| parent | 8304c44631c370646de35d343ddba078738d1719 (diff) | |
| parent | 0f61b1860cc3f52aef9036d7235ed1f017632193 (diff) | |
Merge tag 'v6.19-rc5' into drm-rust-next
We need the drm-rust fixes from -rc5 in here for nova-core to build on
top of.
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'rust/kernel/maple_tree.rs')
| -rw-r--r-- | rust/kernel/maple_tree.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/rust/kernel/maple_tree.rs b/rust/kernel/maple_tree.rs index e72eec56bf57..265d6396a78a 100644 --- a/rust/kernel/maple_tree.rs +++ b/rust/kernel/maple_tree.rs @@ -265,7 +265,16 @@ impl<T: ForeignOwnable> MapleTree<T> { loop { // This uses the raw accessor because we're destroying pointers without removing them // from the maple tree, which is only valid because this is the destructor. - let ptr = ma_state.mas_find_raw(usize::MAX); + // + // Take the rcu lock because mas_find_raw() requires that you hold either the spinlock + // or the rcu read lock. This is only really required if memory reclaim might + // reallocate entries in the tree, as we otherwise have exclusive access. That feature + // doesn't exist yet, so for now, taking the rcu lock only serves the purpose of + // silencing lockdep. + let ptr = { + let _rcu = kernel::sync::rcu::Guard::new(); + ma_state.mas_find_raw(usize::MAX) + }; if ptr.is_null() { break; } |
