From 14b5faf333d66aae307324b41fcf394da81a1a59 Mon Sep 17 00:00:00 2001 From: Chris Freehill Date: Tue, 17 Jun 2025 15:50:53 -0500 Subject: [PATCH] rocr: Add missing close of dmabuf after import [ROCm/ROCR-Runtime commit: 24f36de0371806b8fe500e117dd7fd25682e4e87] --- .../rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp index baebbe6017..0bfbe58fb3 100644 --- a/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp +++ b/projects/rocr-runtime/runtime/hsa-runtime/core/runtime/runtime.cpp @@ -3396,6 +3396,7 @@ Runtime::MappedHandleAllowedAgent::MappedHandleAllowedAgent( status = targetAgent->driver().ImportDMABuf(dmabuf_fd, *targetAgent, shareable_handle); assert(status == HSA_STATUS_SUCCESS); + close(dmabuf_fd); if (status != HSA_STATUS_SUCCESS) return; }