From: Oleg Nesterov <oleg@tv-sign.ru>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Davide Libenzi <davidel@xmailserver.org>, linux-kernel@vger.kernel.org
Subject: [PATCH] signals: send_signal: be paranoid about signalfd_notify()
Date: Wed, 12 Mar 2008 16:17:16 +0300 [thread overview]
Message-ID: <20080312131716.GA14324@tv-sign.ru> (raw)
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;
next reply other threads:[~2008-03-12 13:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-12 13:17 Oleg Nesterov [this message]
2008-03-12 16:35 ` Davide Libenzi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080312131716.GA14324@tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=akpm@linux-foundation.org \
--cc=davidel@xmailserver.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®