linux-next: manual merge of the tip tree with the rust tree
From: Mark Brown
Date: Mon Aug 10 2026 - 13:07:02 EST
Hi all,
Today's linux-next merge of the tip tree got a conflict in:
rust/kernel/sync/rcu.rs
between commit:
d8973c4754437 ("rust: sync: Add abstraction for rcu_barrier()")
from the rust tree and commit:
1fb92e0625596 ("rust: sync: Add abstraction for synchronize_rcu()")
from the tip tree.
I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.
diff --cc rust/kernel/sync/rcu.rs
index 42d1b26a21437,d867240be7369..0000000000000
--- a/rust/kernel/sync/rcu.rs
+++ b/rust/kernel/sync/rcu.rs
@@@ -51,22 -51,18 +51,38 @@@ pub fn read_lock() -> Guard
Guard::new()
}
+/// Wait until all in-flight `call_rcu()` callbacks complete.
+///
+/// Note that this primitive does not necessarily wait for an RCU grace period
+/// to complete. For example, if there are no RCU callbacks queued anywhere
+/// in the system, then [`rcu_barrier()`] is within its rights to return
+/// immediately, without waiting for anything, much less an RCU grace period.
+/// In fact, [`rcu_barrier()`] will normally not result in any RCU grace periods
+/// beyond those that were already destined to be executed.
+///
+/// In kernels built with `CONFIG_RCU_LAZY=y`, this function also hurries all
+/// pending lazy RCU callbacks.
+///
+/// Note that this is one of the RCU primitives which must not be called in
+/// atomic context.
+#[inline]
+pub fn rcu_barrier() {
+ // SAFETY: `rcu_barrier()` is always safe to be called. It just might wait for a grace period.
+ unsafe { bindings::rcu_barrier() };
+}
++
+ /// Wait for one RCU grace period.
+ ///
+ /// Waits for all RCU read-side critical sections (such as those established by
+ /// a [`Guard`]) at the moment of the function call to finish.
+ ///
+ /// Does not prevent new read-side critical sections from starting, which may
+ /// begin and run while this call is blocking.
+ ///
+ /// Note that this is one of the RCU primitives which must not be called in
+ /// atomic context.
+ #[inline]
+ pub fn synchronize_rcu() {
+ // SAFETY: `synchronize_rcu()` is always safe to be called from process context.
+ unsafe { bindings::synchronize_rcu() };
+ }
Attachment:
signature.asc
Description: PGP signature