mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Philipp Stanner" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Philipp Stanner <phasta@kernel.org>,
	work@onurozkan.dev, Danilo Krummrich <dakr@kernel.org>,
	Gary Guo <gary@garyguo.net>, Boqun Feng <boqun@kernel.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: locking/core] rust: revocable: Use safe synchronize_rcu() abstraction
Date: Fri, 07 Aug 2026 16:05:44 -0000	[thread overview]
Message-ID: <178611874436.708.11445557319136729587.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20260624150704.1504001-4-phasta@kernel.org>

The following commit has been merged into the locking/core branch of tip:

Commit-ID:     042278f5fa9e681420ab486d6cbf464e26667461
Gitweb:        https://git.kernel.org/tip/042278f5fa9e681420ab486d6cbf464e26667461
Author:        Philipp Stanner <phasta@kernel.org>
AuthorDate:    Wed, 24 Jun 2026 17:07:03 +02:00
Committer:     Boqun Feng <boqun@kernel.org>
CommitterDate: Tue, 04 Aug 2026 05:52:53 -07:00

rust: revocable: Use safe synchronize_rcu() abstraction

We now have a safe wrapper for the foreign function synchronize_rcu().

Use it in revocable.rs.

Signed-off-by: Philipp Stanner <phasta@kernel.org>
Reviewed-by: Onur Özkan <work@onurozkan.dev>
Reviewed-by: Danilo Krummrich <dakr@kernel.org>
Reviewed-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Boqun Feng <boqun@kernel.org>
Link: https://patch.msgid.link/20260624150704.1504001-4-phasta@kernel.org
---
 rust/kernel/revocable.rs |  9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/rust/kernel/revocable.rs b/rust/kernel/revocable.rs
index 0f4ae67..f539603 100644
--- a/rust/kernel/revocable.rs
+++ b/rust/kernel/revocable.rs
@@ -7,7 +7,11 @@
 
 use pin_init::Wrapper;
 
-use crate::{bindings, prelude::*, sync::rcu, types::Opaque};
+use crate::{
+    prelude::*,
+    sync::rcu,
+    types::Opaque, //
+};
 use core::{
     marker::PhantomData,
     ops::Deref,
@@ -161,8 +165,7 @@ impl<T> Revocable<T> {
 
         if revoke {
             if SYNC {
-                // SAFETY: Just an FFI call, there are no further requirements.
-                unsafe { bindings::synchronize_rcu() };
+                rcu::synchronize_rcu();
             }
 
             // SAFETY: We know `self.data` is valid because only one CPU can succeed the

  reply	other threads:[~2026-08-07 16:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-24 15:07 [PATCH v3 0/3] Add and use abstraction for synchronize_rcu() Philipp Stanner
2026-06-24 15:07 ` [PATCH v3 1/3] rust: sync: Add " Philipp Stanner
2026-08-07 16:05   ` [tip: locking/core] " tip-bot2 for Philipp Stanner
2026-06-24 15:07 ` [PATCH v3 2/3] rust: revocable: Use safe synchronize_rcu() abstraction Philipp Stanner
2026-08-07 16:05   ` tip-bot2 for Philipp Stanner [this message]
2026-06-24 15:07 ` [PATCH v3 3/3] rust: sync: Use safe synchronize_rcu() abstraction in poll Philipp Stanner
2026-08-07 16:05   ` [tip: locking/core] " tip-bot2 for Philipp Stanner
2026-06-24 15:30 ` [PATCH v3 0/3] Add and use abstraction for synchronize_rcu() Boqun Feng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178611874436.708.11445557319136729587.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=boqun@kernel.org \
    --cc=dakr@kernel.org \
    --cc=gary@garyguo.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=phasta@kernel.org \
    --cc=work@onurozkan.dev \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®