Re: [PATCH v4] rust: sync: Accept errors for Lock payload data
From: Alice Ryhl
Date: Sat Oct 31 2026 - 15:13:53 EST
On Thu, Oct 22, 2026 at 06:07:26PM +0200, Philipp Stanner wrote:
> The `Lock` baseclass currently does not allow for fallible user-data.
> This can cause conflicts when used with other primitives, for example
> when a lock shall be pin-initialized with payload data that is fallible.
>
> Add support for the lock base class so that it works with
> try_pin_init!(). Adjust spinlock and mutex accordingly.
>
> Signed-off-by: Philipp Stanner <phasta@xxxxxxxxxx>
Boqun, are you ok with merging this through drm-rust-next for JobQueue, once
we get Gary's reviewed-by?
Reviewed-by: Alice Ryhl <aliceryhl@xxxxxxxxxx>