mirror of
https://github.com/apache/nuttx.git
synced 2026-08-07 21:47:17 +00:00
Summary: - During Wi-Fi audio streaming test, I found a deadlock in nxtask_exit() - Actually, nxtask_exit() was called and tried to enter critical section - In enter_critical_section(), there is a deadlock avoidance logic - However, if switched to a new rtcb with irqcount=0, the logic did not work - Because the 2nd critical section was treated as if it were the 1st one - Actually, it tried to run the deadlock avoidance logic - But nxtask_exit() was called with critical section (i.e. IRQ already disabled) - So the logic did not work as expected because up_irq_restore() did not enable the IRQ. - This commit fixes this issue by incrementing irqcount before calling nxtask_terminate() - Also it adjusts g_cpu_irqlock and g_cpu_lockset Impact: - Affects SMP only Testing: - Tested with spresense:wifi_smp (smp, ostest, nxplayer, telnetd) - Tested with sabre-6quad:smp with QEMU (smp, ostest) - Tested with maix-bit:smp with QEMU (smp, ostest) - Tested with esp32-core:smp with QEMU (smp, ostest) Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com> |
||
|---|---|---|
| .. | ||
| exit.c | ||
| Make.defs | ||
| spawn.h | ||
| task.h | ||
| task_activate.c | ||
| task_atexit.c | ||
| task_cancelpt.c | ||
| task_create.c | ||
| task_delete.c | ||
| task_execv.c | ||
| task_exit.c | ||
| task_exithook.c | ||
| task_getgroup.c | ||
| task_getpid.c | ||
| task_init.c | ||
| task_onexit.c | ||
| task_posixspawn.c | ||
| task_prctl.c | ||
| task_recover.c | ||
| task_reparent.c | ||
| task_restart.c | ||
| task_setcancelstate.c | ||
| task_setcanceltype.c | ||
| task_setup.c | ||
| task_spawn.c | ||
| task_spawnparms.c | ||
| task_start.c | ||
| task_starthook.c | ||
| task_terminate.c | ||
| task_testcancel.c | ||
| task_vfork.c | ||