* [PATCH] signals: send_signal: be paranoid about signalfd_notify()
@ 2008-03-12 13:17 Oleg Nesterov
2008-03-12 16:35 ` Davide Libenzi
0 siblings, 1 reply; 2+ messages in thread
From: Oleg Nesterov @ 2008-03-12 13:17 UTC (permalink / raw)
To: Andrew Morton; +Cc: Davide Libenzi, linux-kernel
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>
--- 25/kernel/signal.c~3_SS_NOTIFY 2008-03-12 15:16:52.000000000 +0300
+++ 25/kernel/signal.c 2008-03-12 15:55:47.000000000 +0300
@@ -769,13 +769,6 @@ static int send_signal(int sig, struct s
*/
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.
@@ -825,6 +818,7 @@ static int send_signal(int sig, struct s
}
out_set:
+ signalfd_notify(t, sig);
sigaddset(&pending->signal, sig);
complete_signal(sig, t, group);
return 0;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] signals: send_signal: be paranoid about signalfd_notify()
2008-03-12 13:17 [PATCH] signals: send_signal: be paranoid about signalfd_notify() Oleg Nesterov
@ 2008-03-12 16:35 ` Davide Libenzi
0 siblings, 0 replies; 2+ messages in thread
From: Davide Libenzi @ 2008-03-12 16:35 UTC (permalink / raw)
To: Oleg Nesterov; +Cc: Andrew Morton, Linux Kernel Mailing List
On Wed, 12 Mar 2008, Oleg Nesterov wrote:
> 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>
Looks fine to me.
Acked-by: Davide Libenzi <davidel@xmailserver.org>
>
> --- 25/kernel/signal.c~3_SS_NOTIFY 2008-03-12 15:16:52.000000000 +0300
> +++ 25/kernel/signal.c 2008-03-12 15:55:47.000000000 +0300
> @@ -769,13 +769,6 @@ static int send_signal(int sig, struct s
> */
> 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.
> @@ -825,6 +818,7 @@ static int send_signal(int sig, struct s
> }
>
> out_set:
> + signalfd_notify(t, sig);
> sigaddset(&pending->signal, sig);
> complete_signal(sig, t, group);
> return 0;
>
- Davide
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-12 16:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-12 13:17 [PATCH] signals: send_signal: be paranoid about signalfd_notify() Oleg Nesterov
2008-03-12 16:35 ` Davide Libenzi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®