On Sat Nov 7, 2026 at 2:03 AM GMT, Danilo Krummrich wrote:
> Wrap the GEM object open and close callbacks with a RegistrationGuard
> (drm_dev_enter / drm_dev_exit) to ensure the driver callbacks only run
> while the parent bus device is bound.
> 
> If the device has been unbound, open returns -ENODEV and close silently
> returns. This prevents driver code from accessing device resources after
> unbind and is a prerequisite for making drm::Driver::File
> lifetime-parameterized, since GEM callbacks receive a &drm::File that
> could otherwise be used to access invalidated file private data.
> 
> Reviewed-by: Alice Ryhl <[email protected]>
> Reviewed-by: Daniel Almeida <[email protected]>
> Signed-off-by: Danilo Krummrich <[email protected]>

Reviewed-by: Gary Guo <[email protected]>

> ---
>  rust/kernel/drm/gem/mod.rs | 16 ++++++++++++++++
>  1 file changed, 16 insertions(+)

Reply via email to