Module: Mesa
Branch: staging/22.0
Commit: aa7012422538e1a5c75623dd20baca697e9f4c28
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=aa7012422538e1a5c75623dd20baca697e9f4c28

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>

PPA Note: This commit has been modified to apply to mesa 22.0.

---

 .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);

Reply via email to