Fix DMABuf FD closure for IPC attach client

We should also close the client side dmabuf fd after importing for target
nodes.

Change-Id: I74f61dd65bebb03dc002f5df7301efd1ef8d9603
This commit is contained in:
Jonathan Kim authored and David Yat Sin committed 2024-02-06 23:15:29 +00:00
1 parent 62f3f250ce
commit 15691ae460
1 file changed
+1
@@ -1375,6 +1375,7 @@ hsa_status_t Runtime::IPCAttach(const hsa_amd_ipc_memory_t* handle, size_t len,
if (ret != HSA_STATUS_SUCCESS) return HSA_STATUS_ERROR_INVALID_ARGUMENT;
if (ipc_dmabuf_supported_) {
close(dmabuf_fd);
importAddress = info.MemoryAddress;
importSize = info.SizeInBytes;
}