mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 23:03:02 +08:00
fix: Force Close of IPC handles at memFree
Related-To: LOCI-4455 Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
e08c1716bf
commit
b589e32c4b
@@ -1058,8 +1058,10 @@ GraphicsAllocation *DrmMemoryManager::createGraphicsAllocationFromSharedHandle(o
|
||||
}
|
||||
|
||||
void DrmMemoryManager::closeInternalHandle(uint64_t &handle, uint32_t handleId, GraphicsAllocation *graphicsAllocation) {
|
||||
DrmAllocation *drmAllocation = static_cast<DrmAllocation *>(graphicsAllocation);
|
||||
drmAllocation->clearInternalHandle(handleId);
|
||||
if (graphicsAllocation) {
|
||||
DrmAllocation *drmAllocation = static_cast<DrmAllocation *>(graphicsAllocation);
|
||||
drmAllocation->clearInternalHandle(handleId);
|
||||
}
|
||||
[[maybe_unused]] auto status = this->closeFunction(static_cast<int>(handle));
|
||||
DEBUG_BREAK_IF(status != 0);
|
||||
}
|
||||
|
||||
@@ -610,8 +610,10 @@ void WddmMemoryManager::freeGraphicsMemoryImpl(GraphicsAllocation *gfxAllocation
|
||||
}
|
||||
|
||||
void WddmMemoryManager::closeInternalHandle(uint64_t &handle, uint32_t handleId, GraphicsAllocation *graphicsAllocation) {
|
||||
WddmAllocation *wddmAllocation = static_cast<WddmAllocation *>(graphicsAllocation);
|
||||
wddmAllocation->clearInternalHandle(handleId);
|
||||
if (graphicsAllocation) {
|
||||
WddmAllocation *wddmAllocation = static_cast<WddmAllocation *>(graphicsAllocation);
|
||||
wddmAllocation->clearInternalHandle(handleId);
|
||||
}
|
||||
[[maybe_unused]] auto status = SysCalls::closeHandle(reinterpret_cast<void *>(reinterpret_cast<uintptr_t *>(handle)));
|
||||
DEBUG_BREAK_IF(!status);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user