On Tue, Jun 21, 2016 at 09:53:45AM +0100, Chris Wilson wrote:
> Currently debugfs files are created before the driver is even loads.
> This gives the opportunity for userspace to open that interface and poke
> around before the backing data structures are initialised - with the
> possibility of oopsing or worse.
> 
> Move the creation of the debugfs files to our registration phase, where
> we announce our presence to the world when we are ready, i.e the
> sequence changes from
> 
>       drm_dev_register()
>        -> drm_minor_register()
>         -> drm_debugfs_init()
>          -> i915_debugfs_init()
>        -> i915_driver_load()
> 
> to
> 
>       drm_dev_register()
>        -> drm_minor_register()
>         -> drm_debugfs_init()
>        -> i915_driver_load()
>         -> i915_debugfs_register()
> 
> Signed-off-by: Chris Wilson <[email protected]>
> Cc: Ville Syrjälä <[email protected]>
> Reviewed-by: Ville Syrjälä <[email protected]>

->debugfs_init/cleanup() is another midlayer thing we probably should nuke
over the next decade or so, like with ->load/unload() ;-)
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to