!683 fix: 非当前进程退出时,销毁liteipc时错误的销毁了当前进程的

Merge pull request !683 from zhushengle/liteipc
This commit is contained in:
openharmony_ci 2021-10-29 01:51:33 +00:00 committed by Gitee
commit b2274a009e
3 changed files with 3 additions and 4 deletions

View File

@ -374,7 +374,7 @@ LITE_OS_SEC_TEXT VOID OsProcessResourcesToFree(LosProcessCB *processCB)
#ifdef LOSCFG_KERNEL_LITEIPC
if (OsProcessIsUserMode(processCB)) {
LiteIpcPoolDelete(&(processCB->ipcInfo));
LiteIpcPoolDelete(&(processCB->ipcInfo), processCB->processID);
(VOID)memset_s(&(processCB->ipcInfo), sizeof(ProcIpcInfo), 0, sizeof(ProcIpcInfo));
}
#endif

View File

@ -254,11 +254,10 @@ LITE_OS_SEC_TEXT UINT32 LiteIpcPoolReInit(ProcIpcInfo *child, const ProcIpcInfo
return LOS_OK;
}
LITE_OS_SEC_TEXT VOID LiteIpcPoolDelete(ProcIpcInfo *ipcInfo)
LITE_OS_SEC_TEXT VOID LiteIpcPoolDelete(ProcIpcInfo *ipcInfo, UINT32 processID)
{
UINT32 intSave;
IpcUsedNode *node = NULL;
UINT32 processID = LOS_GetCurrProcessID();
if (ipcInfo->pool.kvaddr != NULL) {
LOS_VFree(ipcInfo->pool.kvaddr);
ipcInfo->pool.kvaddr = NULL;

View File

@ -184,7 +184,7 @@ extern UINT32 LiteIpcPoolInit(ProcIpcInfo *ipcInfo);
extern UINT32 LiteIpcPoolReInit(ProcIpcInfo *childIpcInfo, const ProcIpcInfo *parentIpcInfo);
/* delete process liteipc memory pool */
extern VOID LiteIpcPoolDelete(ProcIpcInfo *ipcInfo);
extern VOID LiteIpcPoolDelete(ProcIpcInfo *ipcInfo, UINT32 processID);
/* remove service handle and send death notify */
extern VOID LiteIpcRemoveServiceHandle(LosTaskCB *taskCB);