Re: [PATCH v5 10/19] rust: drm: pin ioctl Device reference to Normal context
From: Alexandre Courbot
Date: Thu Jul 02 2026 - 00:54:43 EST
On Sun Jun 28, 2026 at 11:53 PM JST, Danilo Krummrich wrote:
> Explicitly annotate the Device reference produced by from_raw() in the
> ioctl dispatch macro as Device<_, Normal>. Without this annotation, the
> context is inferred from the handler's first parameter type, which would
> allow a handler declaring &Device<T, Registered> to obtain a Registered
> reference without runtime proof via RegistrationGuard.
>
> Reviewed-by: Lyude Paul <lyude@xxxxxxxxxx>
> Signed-off-by: Danilo Krummrich <dakr@xxxxxxxxxx>
Reviewed-by: Alexandre Courbot <acourbot@xxxxxxxxxx>