arch/*/*_sigdeliver.c: Fix a race condition is signal delivery for SMP

This fixes the same issue for other targets, which was already fixed for
xtensa in commit 50d94863.

After the signals have been delivered, the local irqs need to be
disabled until the context switch. But just calling
leave_critical_section(regs[xx]) will enable them if they were
enabled in the context.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
This commit is contained in:
Jukka Laitinen
2025-08-04 09:20:33 +03:00
committed by Xiang Xiao
parent ddf74ae059
commit 9cda3ce216
9 changed files with 9 additions and 27 deletions
@@ -209,9 +209,7 @@ retry:
#ifdef CONFIG_SMP
/* We need to keep the IRQ lock until task switching */
rtcb->irqcount++;
leave_critical_section((regs[REG_PSR]));
rtcb->irqcount--;
leave_critical_section(up_irq_save());
#endif
sparc_fullcontextrestore(regs);
}