nvk: Clear cond_render_gart_* in reset_cmd_buffer

nvk_cmd_pool_free_gart_mem_list frees this buffer, so we need to clear
the pointers to it in order to avoid a use after free.

Fixes: 07c70c77de ("nvk: add cond render upload buffer.")
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Reviewed-by: Mary Guillemard <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37153>
(cherry picked from commit eaa547f6f2)
This commit is contained in:
Mel Henning 2025-09-02 16:14:07 -04:00 committed by Eric Engestrom
parent 46d835f823
commit a5e926891c
2 changed files with 3 additions and 1 deletions

View file

@ -9404,7 +9404,7 @@
"description": "nvk: Clear cond_render_gart_* in reset_cmd_buffer",
"nominated": true,
"nomination_type": 2,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "07c70c77de4b7894df6719a0c19293ac85d53686",
"notes": null

View file

@ -114,6 +114,8 @@ nvk_reset_cmd_buffer(struct vk_command_buffer *vk_cmd_buffer,
cmd->push_mem = NULL;
cmd->push_mem_limit = NULL;
cmd->push = (struct nv_push) {0};
cmd->cond_render_gart_mem = NULL;
cmd->cond_render_gart_offset = 0;
util_dynarray_clear(&cmd->pushes);