diff options
author | Oleg Nesterov <oleg@tv-sign.ru> | 2008-04-30 03:53:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-30 11:29:36 -0400 |
commit | 53c30337f2c61aff6eecf2a446e839641172f9bd (patch) | |
tree | 268c52124c19b379b7f9c32430414acb606699cb /kernel | |
parent | 021e1ae3d85a76ce962a300c96813f04ae50c87c (diff) |
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.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index 8423867f7d8f..251cc13720bd 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, | |||
772 | */ | 772 | */ |
773 | if (legacy_queue(pending, sig)) | 773 | if (legacy_queue(pending, sig)) |
774 | return 0; | 774 | return 0; |
775 | |||
776 | /* | ||
777 | * Deliver the signal to listening signalfds. This must be called | ||
778 | * with the sighand lock held. | ||
779 | */ | ||
780 | signalfd_notify(t, sig); | ||
781 | |||
782 | /* | 775 | /* |
783 | * fast-pathed signals for kernel-internal things like SIGSTOP | 776 | * fast-pathed signals for kernel-internal things like SIGSTOP |
784 | * or SIGKILL. | 777 | * or SIGKILL. |
@@ -828,6 +821,7 @@ static int send_signal(int sig, struct siginfo *info, struct task_struct *t, | |||
828 | } | 821 | } |
829 | 822 | ||
830 | out_set: | 823 | out_set: |
824 | signalfd_notify(t, sig); | ||
831 | sigaddset(&pending->signal, sig); | 825 | sigaddset(&pending->signal, sig); |
832 | complete_signal(sig, t, group); | 826 | complete_signal(sig, t, group); |
833 | return 0; | 827 | return 0; |