[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87h658p6kz.fsf@kloenk.dev>
Date: Wed, 05 Feb 2025 19:52:28 +0100
From: Fiona Behrens <me@...enk.dev>
To: Alice Ryhl <aliceryhl@...gle.com>
Cc: Miguel Ojeda <ojeda@...nel.org>, Boqun Feng <boqun.feng@...il.com>,
Gary Guo <gary@...yguo.net>, Björn Roy Baron
<bjorn3_gh@...tonmail.com>, Benno Lossin <benno.lossin@...ton.me>,
Andreas Hindborg <a.hindborg@...nel.org>, Trevor Gross
<tmgross@...ch.edu>, Peter Zijlstra <peterz@...radead.org>, Ingo Molnar
<mingo@...hat.com>, Will Deacon <will@...nel.org>, Waiman Long
<longman@...hat.com>, rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] rust: sync: add accessor for the lock behind a given
guard
Alice Ryhl <aliceryhl@...gle.com> writes:
> Binder has some methods where the caller provides a lock guard, and
> Binder needs to be able to assert that the guard is associated with the
> right lock. To enable this, add an accessor to obtain a reference to the
> underlying lock that you can pass to `ptr::eq`.
>
> Signed-off-by: Alice Ryhl <aliceryhl@...gle.com>
Reviewed-by: Fiona Behrens <me@...enk.dev>
Thanks,
Fiona
> ---
> Changes in v2:
> - Rename to lock_ref() to avoid confusion with lock().
> - Rebase on v6.14-rc1.
> - Link to v1: https://lore.kernel.org/r/20250130-guard-get-lock-v1-1-8ed87899920a@google.com
> ---
Powered by blists - more mailing lists