Re: [PATCH] drm/fb-helper: Fix a locking bug in an error path

From: Javier Martinez Canillas

Date: Thu Apr 09 2026 - 06:14:18 EST


Bart Van Assche <bvanassche@xxxxxxx> writes:

> The name of the function __drm_fb_helper_initial_config_and_unlock() and
> also the comment above that function make it clear that all code paths
> in this function should unlock fb_helper->lock before returning. Add a
> mutex_unlock() call in the only code path where it is missing. This has
> been detected by the Clang thread-safety analyzer.
>
> Cc: Thomas Zimmermann <tzimmermann@xxxxxxx>
> Cc: Christian König <christian.koenig@xxxxxxx> # radeon
> Cc: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx> # msm
> Cc: Javier Martinez Canillas <javierm@xxxxxxxxxx>
> Fixes: 63c971af4036 ("drm/fb-helper: Allocate and release fb_info in single place")
> Signed-off-by: Bart Van Assche <bvanassche@xxxxxxx>
> ---

Indeed, thanks for fixing this.

Reviewed-by: Javier Martinez Canillas <javierm@xxxxxxxxxx>

--
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat