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] [day] [month] [year] [list]
Message-ID: <CAH5fLghFCSS7HB7JqucpAPrExdttvcOSNJwuZMFNXspu0=4G4w@mail.gmail.com>
Date: Mon, 21 Jul 2025 13:06:06 +0200
From: Alice Ryhl <aliceryhl@...gle.com>
To: TruongSinh Tran-Nguyen <i@...ongsinh.pro>
Cc: rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org, 
	ojeda@...nel.org, alex.gaynor@...il.com, gary@...yguo.net, 
	bjorn3_gh@...tonmail.com, lossin@...nel.org, a.hindborg@...nel.org, 
	tmgross@...ch.edu, dakr@...nel.org
Subject: Re: [PATCH] rust: Add #[must_use] to Lock::try_lock,
 GlobalLock::try_lock, and XArray::try_lock

On Fri, Jul 18, 2025 at 4:20 PM TruongSinh Tran-Nguyen <i@...ongsinh.pro> wrote:
>
> These methods return an RAII guard that unlocks the lock when dropped.
> If the return value is ignored, the lock is released immediately,
> which is likely not the intended behavior.
>
> This addresses issue #1133 in the rust-for-linux project.
>
> Signed-off-by: TruongSinh Tran-Nguyen <i@...ongsinh.pro>

I like the reason string that the previous patch used:
if unused, the lock will be immediately unlocked

Perhaps we could update this to use that wording for the remaining
try_lock methods?

Alice

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ