Re: [PATCH v5 18/19] rust: drm: Pass registration data to ioctl handlers
"Alexandre Courbot" <[email protected]>
| Newsgroups | dev.linux.lists.nova-gpu,dev.linux.lists.driver-core,org.freedesktop.lists.dri-devel,org.kernel.vger.linux-kernel,org.kernel.vger.rust-for-linux |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> > Signed-off-by: Danilo Krummrich <[email protected]> Reviewed-by: Alexandre Courbot <[email protected]> (Sashiko's report appears to be invalid - the HRTB is precisely what prevents the behavior it claims is possible)