Hi, On Fri, Jan 30, 2026 at 11:10:49AM +0200, Laurent Pinchart wrote: > On Thu, Jan 29, 2026 at 11:29:03PM +0100, Danilo Krummrich wrote: > > (Cc: Maxime, Thomas, Maarten) > > > > On Thu Jan 29, 2026 at 2:08 AM CET, Laurent Pinchart wrote: > > > That's what I've been advocating for. The best way to ensure that driver > > > code will not accessed data freed at .remove() time is to prevent the > > > code to run at all. > > > > With this we are in full agreement, I think that'd be best too. But, I also > > think that sometimes this isn't possible. For instance, DRM has such a case > > with > > atomic mode setting. > > I don't see why it would be impossible there.
I'm not quite sure what you have in mind there, but DRM always allowed the DRM driver to stick around longer than its device to accomodate the fact that userspace might still have an open fd to it. If userspace has an open fd, it can still call ioctl so preventing to run any code is going to be difficult. Maxime
signature.asc
Description: PGP signature
