SWDEV-369547 - Ensure that ipc_mem_detach is not called for non-ipcShared MemObj.

Change-Id: Ia73b60b9f08d593301879e0f72c395edbc215112
这个提交包含在:
Ioannis Assiouras 于 2022-11-30 02:16:13 -05:00 提交
1 父节点 e74835795a
当前提交 b445717f72
1 个文件已更改
+5
+5
查看文件
@@ -2242,6 +2242,11 @@ bool Device::IpcDetach (void* dev_ptr) const {
return false;
}
if (!amd_mem_obj->ipcShared()) {
DevLogPrintfError("Memory object for the ptr: 0x%x is not ipcShared \n", dev_ptr);
return false;
}
// Get the original pointer from the amd::Memory object
void* orig_dev_ptr = nullptr;
if (amd_mem_obj->getSvmPtr() != nullptr) {