posix-timers: don't switch to ->group_leader if ->it_process dies
authorOleg Nesterov <oleg@tv-sign.ru>
Mon, 22 Sep 2008 21:42:46 +0000 (14:42 -0700)
committerThomas Gleixner <tglx@linutronix.de>
Wed, 24 Sep 2008 13:45:47 +0000 (15:45 +0200)
commit4aa7361179bed905fd0f35b236a5c65db683b9e0
tree115b16f51fafc38f8a76c9fd7e71ce44884aa8e7
parentbb34d92f643086d546b49cef680f6f305ed84414
posix-timers: don't switch to ->group_leader if ->it_process dies

posix_timer_event() drops SIGEV_THREAD_ID and switches to ->group_leader
if send_sigqueue() fails.

This is not very useful and doesn't work reliably.  send_sigqueue() can
only fail if ->it_process is dead.  But it can die before it dequeues the
SI_TIMER signal, in that case the timer stops anyway.

Remove this code.  I guess it was needed a long ago to ensure that the
timer is not destroyed when when its creator thread dies.

Q: perhaps it makes sense to change sys_timer_settime() to return an error
if ->it_process is dead?

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: mingo@elte.hu
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/posix-timers.c