Re: [PATCH 2/3] drm/ingenic: Register devm action to cleanup encoders

2021-01-18 Thread Paul Cercueil
Hi Laurent, Le lun. 18 janv. 2021 à 11:43, Laurent Pinchart a écrit : Hi Paul, Thank you for the patch. On Sun, Jan 17, 2021 at 11:26:45AM +, Paul Cercueil wrote: Since the encoders have been devm-allocated, they will be freed way before drm_mode_config_cleanup() is called. To avoid u

Re: [PATCH 2/3] drm/ingenic: Register devm action to cleanup encoders

2021-01-18 Thread Daniel Vetter
On Mon, Jan 18, 2021 at 11:37:49AM +, Paul Cercueil wrote: > Hi Laurent, > > Le lun. 18 janv. 2021 à 11:43, Laurent Pinchart > a écrit : > > Hi Paul, > > > > Thank you for the patch. > > > > On Sun, Jan 17, 2021 at 11:26:45AM +, Paul Cercueil wrote: > > > Since the encoders have been d

Re: [PATCH 2/3] drm/ingenic: Register devm action to cleanup encoders

2021-01-18 Thread Laurent Pinchart
Hi Paul, Thank you for the patch. On Sun, Jan 17, 2021 at 11:26:45AM +, Paul Cercueil wrote: > Since the encoders have been devm-allocated, they will be freed way > before drm_mode_config_cleanup() is called. To avoid use-after-free > conditions, we then must ensure that drm_encoder_cleanup()

[PATCH 2/3] drm/ingenic: Register devm action to cleanup encoders

2021-01-17 Thread Paul Cercueil
Since the encoders have been devm-allocated, they will be freed way before drm_mode_config_cleanup() is called. To avoid use-after-free conditions, we then must ensure that drm_encoder_cleanup() is called before the encoders are freed. Fixes: c369cb27c267 ("drm/ingenic: Support multiple panels/bri