Re: [PATCH 2.6.27-rc5] Fix itimer/many thread hang.

From: Oleg Nesterov
Date: Wed Sep 10 2008 - 07:38:59 EST


On 09/09, Roland McGrath wrote:
>
> > As for this particular function, it seems to me that ->signal == NULL
> > is not possible, no?
>
> The concern is to make sure that the timer tick path is always safe for a
> tick that hits during release_task(current) in exit_notify(). A timer tick
> there can come with current->signal == NULL. We just need to make sure one
> way or another that this is safe.

run_posix_cpu_timers() must check ->signal != NULL anyway. (The same for
other functions like account_group_user_time() which are called by the
timer tick).

Apart from the timer tick, "current" should not use this function after
exit_notify().

And, if tsk != current, ->signal must be pinned, this means it can't be NULL.


Perhaps I missed something, but imho this check is confusing and misleading.
However, this is just a minor detail even if I am right.

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/