Restrict clearing TIF_SIGPENDING
authorRoland McGrath <roland@redhat.com>
Wed, 6 Jun 2007 10:59:00 +0000 (03:59 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Thu, 7 Jun 2007 15:52:15 +0000 (08:52 -0700)
commitb74d0deb968e1f85942f17080eace015ce3c332c
tree7db612ba2931ef22ff7166f51dcb0fd1fe1d7ee1
parent8381e04b90ce9e7669a2d20aa7aaff3be910e447
Restrict clearing TIF_SIGPENDING

This patch should get a few birds.  It prevents sigaction calls from
clearing TIF_SIGPENDING in other threads, which could leak -ERESTART*.
And It fixes ptrace_stop not to clear it, which done at the syscall exit
stop could leak -ERESTART*.  It probably removes the harm from signalfd,
at least assuming it never calls dequeue_signal on kernel threads that
might have used block_all_signals.

Signed-off-by: Roland McGrath <roland@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Satoru Takeuchi <takeuchi_satoru@jp.fujitsu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/signal.c