tu/kgsl: initialize dump bo state in kgsl_bo_init sooner

In kgsl_bo_init(), tu_dump_bo_init() should be called for tu_bo after
it's initialized and before it's possibly mapped, since the mapping
can fail and cause kgsl_bo_finish() to call tu_dump_bo_del() for tu_bo
with an improperly initialized dump_bo_list_idx, leading to crashes.

Signed-off-by: Zan Dobersek <zdobersek@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41983>
This commit is contained in:
Zan Dobersek 2026-06-01 09:53:13 +02:00 committed by Marge Bot
parent bed8008c9d
commit fbdc5814ad

View file

@ -298,6 +298,8 @@ kgsl_bo_init(struct tu_device *dev,
.base = base,
};
tu_dump_bo_init(dev, bo);
VkResult result = VK_SUCCESS;
if (lazy_vma) {
@ -309,8 +311,6 @@ kgsl_bo_init(struct tu_device *dev,
if (result != VK_SUCCESS)
return result;
tu_dump_bo_init(dev, bo);
*out_bo = bo;
TU_RMV(bo_allocate, dev, bo);