Mesa (main): vulkan: Unlock before return.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Nov 24 15:42:48 UTC 2021


Module: Mesa
Branch: main
Commit: 7fb6eafbc4fabd1716bc3aec451bf82c05ead28a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7fb6eafbc4fabd1716bc3aec451bf82c05ead28a

Author: Sergii Melikhov <sergii.v.melikhov at globallogic.com>
Date:   Tue Nov 23 10:17:42 2021 +0200

vulkan: Unlock before return.

Fix defect reported by Coverity Scan CID-1494382.

Missing unlock (LOCK): Returning without unlocking queue->submit.mutex.

Fixes: 9bffd81f1cb7c ("vulkan: Add common implementations of vkQueueSubmit and vkQueueWaitIdle")

Signed-off-by: Sergii Melikhov <sergii.v.melikhov at globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13933>

---

 src/vulkan/runtime/vk_queue.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/vulkan/runtime/vk_queue.c b/src/vulkan/runtime/vk_queue.c
index 4c2c3fdc036..8386342e595 100644
--- a/src/vulkan/runtime/vk_queue.c
+++ b/src/vulkan/runtime/vk_queue.c
@@ -463,6 +463,7 @@ vk_queue_submit_thread_func(void *_data)
       cnd_broadcast(&queue->submit.pop);
    }
 
+   mtx_unlock(&queue->submit.mutex);
    return 0;
 }
 



More information about the mesa-commit mailing list