提交 d955790a 编写于 作者: Z zff

fix: 用户态进程主线程退出时,其他子线程刚好进入异常处理流程会导致系统卡死

接口OsTaskExitGroup被同一个进程的两个互等线程重入,逻辑出现死循环,导致系统卡死

close: #I4KGBT
Signed-off-by: Nzff <zhangfanfan2@huawei.com>
Change-Id: I484bba67473f7d0edbfdff95549ffb32bffb4988
上级 ba843825
......@@ -563,7 +563,6 @@ STATIC VOID OsUserExcHandle(ExcContext *excBufAddr)
#else
g_currHandleExcCpuID = INVALID_CPUID;
#endif
runProcess->processStatus &= ~OS_PROCESS_FLAG_EXIT;
#ifdef LOSCFG_KERNEL_SMP
#ifdef LOSCFG_FS_VFS
......@@ -580,10 +579,10 @@ STATIC VOID OsUserExcHandle(ExcContext *excBufAddr)
#endif
OsProcessExitCodeSignalSet(runProcess, SIGUSR2);
/* An exception was raised by a task that is not the current main thread during the exit process of
/* An exception was raised by a task during the exit process of
* the current process.
*/
if ((runProcess->processStatus & OS_PROCESS_FLAG_EXIT) && (runProcess->threadGroupID != runTask->taskID)) {
if (runProcess->processStatus & OS_PROCESS_FLAG_EXIT) {
SCHEDULER_UNLOCK(intSave);
/* Exception handling All operations should be kept prior to that operation */
OsExcRestore();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册