Re: [PATCH] copy_process: remove the unneededclear_tsk_thread_flag(TIF_SIGPENDING)
From: Oleg Nesterov
Date: Tue Apr 28 2009 - 08:52:28 EST
On 04/27, Roland McGrath wrote:
>
> Acked-by: Roland McGrath <roland@xxxxxxxxxx>
>
> > The forked child can have TIF_SIGPENDING if it was copied from parent's
> > ti->flags. But this is harmless and actually almost never happens, because
> > copy_process() can't succeed if signal_pending() == T.
>
> When it does happen, it's actually improper to clear it. In a CLONE_THREAD
> case, the pending signals might include shared_pending signals that the
> child too should take. (Arguably there is no way to notice, since the
> parent thread will be racing to dequeue the same signals.)
Yes, sure. Now I see the changelog is not very clear.
I meant, it is possible that the parent has the false TIF_SIGPENDING which
is cleared later by recalc_sigpending(). In this case it is correct to do
clear_tsk_thread_flag(p, TIF_SIGPENDING), but this almost never happens.
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/