Mesa (staging/18.2): anv: add missing unlock in error path.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Oct 11 08:26:13 UTC 2018
Module: Mesa
Branch: staging/18.2
Commit: 9282afbca47e4e2de81755c643f6cc98227fc634
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9282afbca47e4e2de81755c643f6cc98227fc634
Author: Dave Airlie <airlied at redhat.com>
Date: Fri Oct 5 09:56:19 2018 +1000
anv: add missing unlock in error path.
Not going to matter, but be consistent.
Found by coverity
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Fixes: caf41c78c (anv/allocator: Support softpin in the BO cache)
(cherry picked from commit 29a7631986b10c99d5daad1a571716086a325bd5)
---
src/intel/vulkan/anv_allocator.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c
index f62d48ae3f..67f2f73aa1 100644
--- a/src/intel/vulkan/anv_allocator.c
+++ b/src/intel/vulkan/anv_allocator.c
@@ -1358,6 +1358,7 @@ anv_bo_cache_import(struct anv_device *device,
if ((new_flags & EXEC_OBJECT_PINNED) &&
(bo->bo.flags & EXEC_OBJECT_SUPPORTS_48B_ADDRESS) !=
(bo_flags & EXEC_OBJECT_SUPPORTS_48B_ADDRESS)) {
+ pthread_mutex_unlock(&cache->mutex);
return vk_errorf(device->instance, NULL,
VK_ERROR_INVALID_EXTERNAL_HANDLE,
"The same BO was imported on two different heaps");
More information about the mesa-commit
mailing list