[PATCH v2] drm: Fix potential null pointer dereference issues in drm_managed.c

Dmitry Baryshkov dmitry.baryshkov at oss.qualcomm.com
Mon Aug 4 04:59:21 UTC 2025


On Mon, Aug 04, 2025 at 10:20:21AM +0800, Haoxiang Li wrote:
> Add check for the return value of kstrdup_const() in drm_managed.c
> to prevent potential null pointer dereference.
> 
> Fixes: c6603c740e0e ("drm: add managed resources tied to drm_device")
> Cc: stable at vger.kernel.org
> Signed-off-by: Haoxiang Li <haoxiang_li2024 at 163.com>
> ---
> Changes in v2:
> - Modify a fix error. Thanks, Dmitry!
> ---
>  drivers/gpu/drm/drm_managed.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov at oss.qualcomm.com>


-- 
With best wishes
Dmitry


More information about the dri-devel mailing list