* linux-next: manual merge of the tip tree with the rust tree
@ 2026-08-10 16:58 Mark Brown
2026-08-10 21:25 ` Miguel Ojeda
0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2026-08-10 16:58 UTC (permalink / raw)
To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra
Cc: Boqun Feng, Linux Kernel Mailing List, Linux Next Mailing List,
Miguel Ojeda, Philipp Stanner
[-- Attachment #1: Type: text/plain, Size: 2518 bytes --]
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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: linux-next: manual merge of the tip tree with the rust tree
2026-08-10 16:58 linux-next: manual merge of the tip tree with the rust tree Mark Brown
@ 2026-08-10 21:25 ` Miguel Ojeda
0 siblings, 0 replies; 2+ messages in thread
From: Miguel Ojeda @ 2026-08-10 21:25 UTC (permalink / raw)
To: Mark Brown
Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, Peter Zijlstra,
Boqun Feng, Linux Kernel Mailing List, Linux Next Mailing List,
Miguel Ojeda, Philipp Stanner
On Mon, Aug 10, 2026 at 6:58 PM Mark Brown <broonie@kernel.org> wrote:
>
> 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
Looks good, of course, thanks Mark!
Cheers,
Miguel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-08-10 21:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-10 16:58 linux-next: manual merge of the tip tree with the rust tree Mark Brown
2026-08-10 21:25 ` Miguel Ojeda
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®