Module: Mesa Branch: staging/22.0 Commit: f2a4bb5f4d1f8da759d14cdccb17825d5973f257 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=f2a4bb5f4d1f8da759d14cdccb17825d5973f257
Author: Lionel Landwerlin <[email protected]> Date: Thu Mar 17 11:57:07 2022 +0200 anv: zero-out anv_batch_bo anv_batch_bo has a length field that we use to flush cachelines. Not having that field initialized properly leads us to access out of bound memory. Signed-off-by: Lionel Landwerlin <[email protected]> Cc: mesa-stable Reviewed-by: Jason Ekstrand <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15425> --- .pick_status.json | 2 +- src/intel/vulkan/anv_batch_chain.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 2f49a4023df..9e99f283faf 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -4372,7 +4372,7 @@ "description": "anv: zero-out anv_batch_bo", "nominated": true, "nomination_type": 0, - "resolution": 5, + "resolution": 3, "because_sha": null }, { diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c index 46d712bb752..1442010b38f 100644 --- a/src/intel/vulkan/anv_batch_chain.c +++ b/src/intel/vulkan/anv_batch_chain.c @@ -349,7 +349,7 @@ anv_batch_bo_create(struct anv_cmd_buffer *cmd_buffer, { VkResult result; - struct anv_batch_bo *bbo = vk_alloc(&cmd_buffer->pool->alloc, sizeof(*bbo), + struct anv_batch_bo *bbo = vk_zalloc(&cmd_buffer->pool->alloc, sizeof(*bbo), 8, VK_SYSTEM_ALLOCATION_SCOPE_OBJECT); if (bbo == NULL) return vk_error(cmd_buffer, VK_ERROR_OUT_OF_HOST_MEMORY);
