Re: [PATCH v5 18/19] rust: drm: Pass registration data to ioctl handlers
From: Alexandre Courbot
Date: Thu Jul 02 2026 - 03:25:32 EST
On Sun Jun 28, 2026 at 11:53 PM JST, Danilo Krummrich wrote:
> Pass registration data to ioctl handlers via
> drm::Device<Registered>::registration_data_with(). The closure's HRTB
> ties the lifetime to the closure scope, and the pointer cast shortens it
> from 'static internally. The reference is valid for the duration of the
> drm_dev_enter/exit critical section held by RegistrationGuard.
>
> Reviewed-by: Lyude Paul <lyude@xxxxxxxxxx>
> Signed-off-by: Danilo Krummrich <dakr@xxxxxxxxxx>
Reviewed-by: Alexandre Courbot <acourbot@xxxxxxxxxx>
(Sashiko's report appears to be invalid - the HRTB is precisely what
prevents the behavior it claims is possible)