Re: [PATCH] drm: Prevent modeset helpers to access an uninitialized drm_mode_config

2022-09-06 Thread Daniel Vetter
On Mon, Jul 25, 2022 at 10:28:21AM +0200, Javier Martinez Canillas wrote: > Hello Thomas, > > On 7/25/22 09:12, Thomas Zimmermann wrote: > > [...] > > > Let make the DRM core more robust and prevent this to happen, by marking > a > struct drm_mode_config as initialized durin

Re: [PATCH] drm: Prevent modeset helpers to access an uninitialized drm_mode_config

2022-07-25 Thread Javier Martinez Canillas
Hello Thomas, On 7/25/22 09:12, Thomas Zimmermann wrote: [...] Let make the DRM core more robust and prevent this to happen, by marking a struct drm_mode_config as initialized during drmm_mode_config_init(). that way helpers can check for it and not attempt to grab uninitiali

Re: [PATCH] drm: Prevent modeset helpers to access an uninitialized drm_mode_config

2022-07-25 Thread Thomas Zimmermann
Hi Javier Am 24.07.22 um 20:41 schrieb Javier Martinez Canillas: Hello Thomas, Thanks for your feedback. On 7/24/22 20:24, Thomas Zimmermann wrote: Hi Javier Am 24.07.22 um 14:37 schrieb Javier Martinez Canillas: DRM drivers initialize the mode configuration with drmm_mode_config_init() and

Re: [PATCH] drm: Prevent modeset helpers to access an uninitialized drm_mode_config

2022-07-24 Thread Javier Martinez Canillas
Hello Thomas, Thanks for your feedback. On 7/24/22 20:24, Thomas Zimmermann wrote: > Hi Javier > > Am 24.07.22 um 14:37 schrieb Javier Martinez Canillas: >> DRM drivers initialize the mode configuration with drmm_mode_config_init() >> and that function (among other things) initializes mutexes th

Re: [PATCH] drm: Prevent modeset helpers to access an uninitialized drm_mode_config

2022-07-24 Thread Thomas Zimmermann
Hi Javier Am 24.07.22 um 14:37 schrieb Javier Martinez Canillas: DRM drivers initialize the mode configuration with drmm_mode_config_init() and that function (among other things) initializes mutexes that are later used by modeset helpers. But the helpers should only attempt to grab those locks

[PATCH] drm: Prevent modeset helpers to access an uninitialized drm_mode_config

2022-07-24 Thread Javier Martinez Canillas
DRM drivers initialize the mode configuration with drmm_mode_config_init() and that function (among other things) initializes mutexes that are later used by modeset helpers. But the helpers should only attempt to grab those locks if the mode config was properly initialized. Otherwise it can lead t