Re: [PATCH next] drm/msm/adreno: fix use after free on error path in a6xx_gpu_init()

Konrad Dybcio <[email protected]> Thu, 11 Jun 2026 12:29:53 +0200
Newsgroups gmane.comp.freedesktop.xorg.drivers.freedreno,gmane.linux.ports.arm.msm,gmane.comp.video.dri.devel,gmane.linux.kernel,gmane.linux.kernel.janitors
Message-ID <[email protected]>
On 6/11/26 12:27 PM, Dan Carpenter wrote:
> The a6xx_destroy() function frees "a6xx_gpu" and so "adreno_gpu" points
> to freed memory.  Preserve the error code before freeing the memory to
> avoid a use after free.
> 
> Fixes: d158886cba08 ("drm/msm/adreno: Trust the SSoT UBWC config")
> Signed-off-by: Dan Carpenter <[email protected]>
> ---

Reviewed-by: Konrad Dybcio <[email protected]>

Konrad