vulkan: Unlock before return.
authorSergii Melikhov <sergii.v.melikhov@globallogic.com>
Tue, 23 Nov 2021 08:17:42 +0000 (10:17 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 24 Nov 2021 15:15:46 +0000 (15:15 +0000)
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@globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13933>

src/vulkan/runtime/vk_queue.c

index 4c2c3fd..8386342 100644 (file)
@@ -463,6 +463,7 @@ vk_queue_submit_thread_func(void *_data)
       cnd_broadcast(&queue->submit.pop);
    }
 
+   mtx_unlock(&queue->submit.mutex);
    return 0;
 }