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: <20251110095025.1475896-2-ojeda@kernel.org>
Date: Mon, 10 Nov 2025 10:50:06 +0100
From: Miguel Ojeda <ojeda@...nel.org>
To: Miguel Ojeda <ojeda@...nel.org>,
	Alex Gaynor <alex.gaynor@...il.com>,
	Nathan Chancellor <nathan@...nel.org>,
	Nicolas Schier <nicolas@...sle.eu>
Cc: Boqun Feng <boqun.feng@...il.com>,
	Gary Guo <gary@...yguo.net>,
	Björn Roy Baron <bjorn3_gh@...tonmail.com>,
	Benno Lossin <lossin@...nel.org>,
	Andreas Hindborg <a.hindborg@...nel.org>,
	Alice Ryhl <aliceryhl@...gle.com>,
	Trevor Gross <tmgross@...ch.edu>,
	Danilo Krummrich <dakr@...nel.org>,
	rust-for-linux@...r.kernel.org,
	linux-kbuild@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	patches@...ts.linux.dev
Subject: [PATCH 01/18] rust: condvar: avoid `pub` in example

The future move of pin-init to `syn` uncovers the following unreachable
public item in an example:

    error: unreachable `pub` item
         --> rust/doctests_kernel_generated.rs:14683:1
          |
    14683 | pub struct Example {
          | ---^^^^^^^^^^^^^^^
          | |
          | help: consider restricting its visibility: `pub(crate)`
          |
          = help: or consider exporting it for use by other crates
          = note: `-D unreachable-pub` implied by `-D warnings`
          = help: to override `-D warnings` add `#[allow(unreachable_pub)]`

There is no real downside of keeping the example as-is until the
`syn`-based pin-init is introduced, so there is no need to treat it as
a fix nor to backport it. However, we still need to change it before
introducing the new pin-init.

Thus do so.

Signed-off-by: Miguel Ojeda <ojeda@...nel.org>
---
 rust/kernel/sync/condvar.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/kernel/sync/condvar.rs b/rust/kernel/sync/condvar.rs
index aa5b9a7a726d..1e66e9f548a3 100644
--- a/rust/kernel/sync/condvar.rs
+++ b/rust/kernel/sync/condvar.rs
@@ -46,7 +46,7 @@ macro_rules! new_condvar {
 /// use kernel::sync::{new_condvar, new_mutex, CondVar, Mutex};
 ///
 /// #[pin_data]
-/// pub struct Example {
+/// struct Example {
 ///     #[pin]
 ///     value: Mutex<u32>,
 ///
-- 
2.51.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ