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

2021-03-23 Thread Laurent Pinchart
Hi Paul, Thank you for the patch. On Sun, Jan 24, 2021 at 08:55:51AM +, 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

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

2021-01-24 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. v2: Use the new __drmm_simple_encoder_alloc() function v3: