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

2021-01-21 Thread Paul Cercueil
Le mer. 20 janv. 2021 à 15:04, Daniel Vetter a écrit : On Wed, Jan 20, 2021 at 2:21 PM Paul Cercueil wrote: Le mer. 20 janv. 2021 à 14:01, Daniel Vetter a écrit : > On Wed, Jan 20, 2021 at 1:36 PM Paul Cercueil > wrote: >> >> Since the encoders have been devm-allocated, they

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

2021-01-21 Thread Paul Cercueil
Le mer. 20 janv. 2021 à 14:01, Daniel Vetter a écrit : On Wed, Jan 20, 2021 at 1:36 PM 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 v2 2/3] drm/ingenic: Register devm action to cleanup encoders

2021-01-21 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

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

2021-01-20 Thread Daniel Vetter
On Wed, Jan 20, 2021 at 2:21 PM Paul Cercueil wrote: > > > > Le mer. 20 janv. 2021 à 14:01, Daniel Vetter a > écrit : > > On Wed, Jan 20, 2021 at 1:36 PM Paul Cercueil > > wrote: > >> > >> Since the encoders have been devm-allocated, they will be freed way > >> before

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

2021-01-20 Thread Daniel Vetter
On Wed, Jan 20, 2021 at 1:36 PM 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() is called > before the encoders are