Mesa (staging/19.3): anv: don't close invalid syncfd semaphore

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jan 8 19:33:43 UTC 2020


Module: Mesa
Branch: staging/19.3
Commit: 30cd0c75237f6da38423b0358bf82ce644963d1d
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=30cd0c75237f6da38423b0358bf82ce644963d1d

Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date:   Mon Jan  6 16:38:19 2020 +0200

anv: don't close invalid syncfd semaphore

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Cc: <mesa-stable at lists.freedesktop.org>
Reviewed-by: Tapani Pälli <tapani.palli at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
(cherry picked from commit 4578d4ae524ad433933e077bce6a0b85643e3f25)

---

 src/intel/vulkan/anv_queue.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/intel/vulkan/anv_queue.c b/src/intel/vulkan/anv_queue.c
index 11e70cf288b..b53e72d5ac3 100644
--- a/src/intel/vulkan/anv_queue.c
+++ b/src/intel/vulkan/anv_queue.c
@@ -1011,7 +1011,8 @@ anv_semaphore_impl_cleanup(struct anv_device *device,
       break;
 
    case ANV_SEMAPHORE_TYPE_SYNC_FILE:
-      close(impl->fd);
+      if (impl->fd >= 0)
+         close(impl->fd);
       break;
 
    case ANV_SEMAPHORE_TYPE_DRM_SYNCOBJ:




More information about the mesa-commit mailing list