recalc_sigpending_tsk fixes
authorRoland McGrath <roland@redhat.com>
Wed, 23 May 2007 20:57:44 +0000 (13:57 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 24 May 2007 03:14:12 +0000 (20:14 -0700)
commit7bb44adef39ad3bda2be40bb34686bc56bd563a5
tree1e9eecbd03877c7ac8b00a8cb1d4ae54ebec3bb1
parent3c6df2a9177c010bf811c361149069e4bfd9bb11
recalc_sigpending_tsk fixes

Steve Hawkes discovered a problem where recalc_sigpending_tsk was called in
do_sigaction but no signal_wake_up call was made, preventing later signals
from waking up blocked threads with TIF_SIGPENDING already set.

In fact, the few other calls to recalc_sigpending_tsk outside the signals
code are also subject to this problem in other race conditions.

This change makes recalc_sigpending_tsk private to the signals code.  It
changes the outside calls, as well as do_sigaction, to use the new
recalc_sigpending_and_wake instead.

Signed-off-by: Roland McGrath <roland@redhat.com>
Cc: <Steve.Hawkes@motorola.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/sched.h
kernel/exit.c
kernel/power/process.c
kernel/signal.c