Files
linux-rockchip/drivers/gpu/drm
Konrad Dybcio 247849eeb3 drm/msm/a6xx: Avoid a nullptr dereference when speedbin setting fails
[ Upstream commit 46d4efcccc688cbacdd70a238bedca510acaa8e4 ]

Calling a6xx_destroy() before adreno_gpu_init() leads to a null pointer
dereference on:

msm_gpu_cleanup() : platform_set_drvdata(gpu->pdev, NULL);

as gpu->pdev is only assigned in:

a6xx_gpu_init()
|_ adreno_gpu_init
    |_ msm_gpu_init()

Instead of relying on handwavy null checks down the cleanup chain,
explicitly de-allocate the LLC data and free a6xx_gpu instead.

Fixes: 76efc2453d ("drm/msm/gpu: Fix crash during system suspend after unbind")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/588919/
Signed-off-by: Rob Clark <robdclark@chromium.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-06-12 11:03:49 +02:00
..
2024-04-17 11:18:27 +02:00
2023-03-10 09:34:33 +01:00
2023-08-30 16:10:57 +02:00
2024-01-25 15:27:32 -08:00
2023-05-11 23:03:07 +09:00
2024-03-06 14:45:10 +00:00
2023-05-30 14:03:20 +01:00
2023-02-22 12:59:46 +01:00