On Fri Oct 9, 2026 at 7:39 PM CEST, Daniel Almeida wrote:
> I wonder if this is a problem in practice? And if so, would passing a e.g.:
> Option<&File> be a solution?

No, it's not a problem.  The callback is only ever skipped when the DRM device
is unregistered; this implies that the drm::File and drm::Registration private
data is dropped. I.e. there is no data left the callback could do anything with
in the first place.

> From a purely logical perspective, I do agree that a balanced open()/close()
> makes more sense than silently skipping close() though.

close() is a pure optimization callback, e.g. to unmap memory that userspace
can't reference anymore anyway.  For the reasons mentioned above, providing it
to the driver after the DRM device is unregistered is pointless, and calling it
when unregistering the DRM device would be pointless too, as any data it could
ever access is dropped at this point anyway.

Reply via email to