提交 a0ad1a43 编写于 作者: J Jianglei Nie

fix: 修复hm_liteipc.c的double unlock错误

对g_cmsTask的访问应该加锁,但代码中LOS_MuxLock被误用为LOS_MuxUnLock,导致double unlock错误。
可以将865行的LOS_MuxUnlock改为LOS_MuxLock来解决这个问题。
Signed-off-by: NJianglei Nie <niejianglei2021@163.com>
上级 9995d8e0
...@@ -862,7 +862,7 @@ LITE_OS_SEC_TEXT STATIC UINT32 CheckMsgSize(IpcMsg *msg) ...@@ -862,7 +862,7 @@ LITE_OS_SEC_TEXT STATIC UINT32 CheckMsgSize(IpcMsg *msg)
totalSize += obj->content.ptr.buffSz; totalSize += obj->content.ptr.buffSz;
} }
} }
(VOID)LOS_MuxUnlock(&g_serviceHandleMapMux); (VOID)LOS_MuxLock(&g_serviceHandleMapMux, LOS_WAIT_FOREVER);
if (totalSize > g_cmsTask.maxMsgSize) { if (totalSize > g_cmsTask.maxMsgSize) {
(VOID)LOS_MuxUnlock(&g_serviceHandleMapMux); (VOID)LOS_MuxUnlock(&g_serviceHandleMapMux);
return -EINVAL; return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册