Re: [PATCH 1/2] drm/imx: fix use after free

2020-07-20 Thread Philipp Zabel
On Thu, 2020-06-11 at 14:43 +0200, Marco Felsch wrote: > From: Philipp Zabel > > Component driver structures allocated with devm_kmalloc() in bind() are > freed automatically after unbind(). Since the contained drm structures > are accessed afterwards in drm_mode_config_cleanup(), move the > allo

Re: [PATCH 1/2] drm/imx: fix use after free

2020-06-11 Thread Philipp Zabel
Hi Russell, On Thu, 2020-06-11 at 14:01 +0100, Russell King - ARM Linux admin wrote: > On Thu, Jun 11, 2020 at 02:43:31PM +0200, Marco Felsch wrote: > > From: Philipp Zabel > > > > Component driver structures allocated with devm_kmalloc() in bind() are > > freed automatically after unbind(). Sin

Re: [PATCH 1/2] drm/imx: fix use after free

2020-06-11 Thread Russell King - ARM Linux admin
On Thu, Jun 11, 2020 at 02:43:31PM +0200, Marco Felsch wrote: > From: Philipp Zabel > > Component driver structures allocated with devm_kmalloc() in bind() are > freed automatically after unbind(). Since the contained drm structures > are accessed afterwards in drm_mode_config_cleanup(), move the

[PATCH 1/2] drm/imx: fix use after free

2020-06-11 Thread Marco Felsch
From: Philipp Zabel Component driver structures allocated with devm_kmalloc() in bind() are freed automatically after unbind(). Since the contained drm structures are accessed afterwards in drm_mode_config_cleanup(), move the allocation into probe() to extend the driver structure's lifetime to th