Skip to content

panfrost: Fix NULL dereference in allowlist code

Alyssa Rosenzweig requested to merge alyssa/mesa:null-de into main

If a user attempts to run Panfrost on an unsupported GPU (e.g. Mali T604), Panfrost will refuse to load and will destroy the screen immediately, allowing for a graceful fallback to a software rasterizer. However, the screen destroy code calls a screen_destroy function in the GenXML vtbl -- and this function is still NULL when the allowlist is checked. This manifests as crashes on unsuported GPUs.

Issue tracked down with Icecream95's mad Ghidra skills.

Closes: #5269 (closed) Fixes: 88dc4db6 ("panfrost: Init/destroy blitter from per-gen file") Signed-off-by: Alyssa Rosenzweig alyssa@collabora.com Reported-by: Icecream95 ixn@disroot.org

Merge request reports