In the Linux kernel, the following vulnerability has been resolved:
drm/msm/a6xx: Avoid a nullptr dereference when speedbin setting fails
Calling a6xxdestroy() before adrenogpu_init() leads to a null pointer dereference on:
msmgpucleanup() : platformsetdrvdata(gpu->pdev, NULL);
as gpu->pdev is only assigned in:
a6xxgpuinit() |_ adrenogpuinit |_ msmgpuinit()
Instead of relying on handwavy null checks down the cleanup chain, explicitly de-allocate the LLC data and free a6xx_gpu instead.
Patchwork: https://patchwork.freedesktop.org/patch/588919/