Re: [PATCH v1] signal: fix endless loop in complete_signal() during a non-leader exec

From: Oleg Nesterov

Date: Tue Oct 27 2026 - 07:22:48 EST


On 10/26, Nickolai Zeldovich wrote:
>
> The curr_target walk uses next_thread(), which wraps from the last
> thread to ->group_leader on the assumption that the leader is first on
> signal->thread_head. de_thread() makes the exec'ing thread, the last
> one, the leader before release_task() unlinks the old leader, so a walk
> that starts at the old leader stays on the new one if that thread
> blocks the signal, and never gets back to curr_target.

Oops... Nickolai, thanks, let me think about it. Can't work today, I'll
try to write another email tomorrow.

Oleg.