fix: 用户态进程主线程退出时,其他子线程刚好进入异常处理流程会导致系统卡死
接口OsTaskExitGroup被同一个进程的两个互等线程重入,逻辑出现死循环,导致系统卡死 close: #I4KGBT Signed-off-by: zff <zhangfanfan2@huawei.com> Change-Id: I484bba67473f7d0edbfdff95549ffb32bffb4988
This commit is contained in:
parent
ba8438257a
commit
d955790a44
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue