lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <173506642158.399.6811616014061227676.tip-bot2@tip-bot2>
Date: Tue, 24 Dec 2024 18:53:41 -0000
From: "tip-bot2 for Lyude Paul" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Lyude Paul <lyude@...hat.com>, Filipe Xavier <felipe_life@...e.com>,
 Alice Ryhl <aliceryhl@...gle.com>, Boqun Feng <boqun.feng@...il.com>,
 x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: locking/core] rust: sync: Make Guard::new() public

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

Commit-ID:     daa03fe50ec376aeadd63a264c471c56af194e83
Gitweb:        https://git.kernel.org/tip/daa03fe50ec376aeadd63a264c471c56af194e83
Author:        Lyude Paul <lyude@...hat.com>
AuthorDate:    Tue, 19 Nov 2024 18:11:04 -05:00
Committer:     Boqun Feng <boqun.feng@...il.com>
CommitterDate: Thu, 19 Dec 2024 14:04:42 -08:00

rust: sync: Make Guard::new() public

Since we added a `Lock::from_raw()` function previously, it makes sense
to also introduce an interface for creating a `Guard` from a reference
to a `Lock` for instances where we've derived the `Lock` from a raw
pointer and know that the lock is already acquired, there are such
usages in KMS API.

[Boqun: Add backquotes to type names, reformat the commit log, reword a
 bit on the usage of KMS API]

Signed-off-by: Lyude Paul <lyude@...hat.com>
Reviewed-by: Filipe Xavier <felipe_life@...e.com>
Reviewed-by: Alice Ryhl <aliceryhl@...gle.com>
Signed-off-by: Boqun Feng <boqun.feng@...il.com>
Link: https://lore.kernel.org/r/20241119231146.2298971-3-lyude@redhat.com
---
 rust/kernel/sync/lock.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/kernel/sync/lock.rs b/rust/kernel/sync/lock.rs
index 57dc2e9..72dbf3f 100644
--- a/rust/kernel/sync/lock.rs
+++ b/rust/kernel/sync/lock.rs
@@ -234,7 +234,7 @@ impl<'a, T: ?Sized, B: Backend> Guard<'a, T, B> {
     /// # Safety
     ///
     /// The caller must ensure that it owns the lock.
-    pub(crate) unsafe fn new(lock: &'a Lock<T, B>, state: B::GuardState) -> Self {
+    pub unsafe fn new(lock: &'a Lock<T, B>, state: B::GuardState) -> Self {
         Self {
             lock,
             state,

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ