summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorOleg Nesterov <oleg@tv-sign.ru>2008-04-30 00:53:00 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-30 08:29:36 -0700
commit53c30337f2c61aff6eecf2a446e839641172f9bd (patch)
tree268c52124c19b379b7f9c32430414acb606699cb /kernel
parent021e1ae3d85a76ce962a300c96813f04ae50c87c (diff)
downloadop-kernel-dev-53c30337f2c61aff6eecf2a446e839641172f9bd.zip
op-kernel-dev-53c30337f2c61aff6eecf2a446e839641172f9bd.tar.gz
signals: send_signal: be paranoid about signalfd_notify()
send_signal() shouldn't call signalfd_notify() if it then fails with -EAGAIN. Harmless, just a paranoid cleanup. Also remove the comment. It is obsolete, signalfd_notify() was simplified and does a simple wakeup. Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru> Acked-by: Davide Libenzi <davidel@xmailserver.org> Cc: Roland McGrath <roland@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/signal.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/kernel/signal.c b/kernel/signal.c
index 8423867..251cc13 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -772,13 +772,6 @@ static int send_signal(int sig, struct siginfo *info, struct task_struct *t,
*/
if (legacy_queue(pending, sig))
return 0;
-
- /*
- * Deliver the signal to listening signalfds. This must be called
- * with the sighand lock held.
- */
- signalfd_notify(t, sig);
-
/*
* fast-pathed signals for kernel-internal things like SIGSTOP
* or SIGKILL.
@@ -828,6 +821,7 @@ static int send_signal(int sig, struct siginfo *info, struct task_struct *t,
}
out_set:
+ signalfd_notify(t, sig);
sigaddset(&pending->signal, sig);
complete_signal(sig, t, group);
return 0;
OpenPOWER on IntegriCloud