sem: don't clear waitobj when do sem recover

This commit is intended to solve the bug caused by #7159.
It will fixed data abort issue when task restart in wait sem status.
If delete waitobj in the sem recover function, then we will get the wrong
task list when remove the task from task list.
This commit is contained in:
zhangyuan21 2022-10-09 16:34:46 +08:00 committed by Masayuki Ishikawa
parent 4ce8cf7bdc
commit 09a06e7fce

View File

@ -98,14 +98,6 @@ void nxsem_recover(FAR struct tcb_s *tcb)
*/
sem->semcount++;
/* Clear the semaphore to assure that it is not reused. But leave the
* state as TSTATE_WAIT_SEM. This is necessary because this is a
* necessary indication that the TCB still resides in the waiting-for-
* semaphore list.
*/
tcb->waitobj = NULL;
}
/* Release all semphore holders for the task */