From: Oleg Nesterov <oleg@tv-sign.ru>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Roland McGrath <roland@redhat.com>, linux-kernel@vger.kernel.org
Subject: [PATCH] do_sigaction: don't worry about signal_pending()
Date: Mon, 20 Aug 2007 20:01:57 +0400 [thread overview]
Message-ID: <20070820160157.GA1279@tv-sign.ru> (raw)
do_sigaction() returns -ERESTARTNOINTR if signal_pending(). The comment says:
* If there might be a fatal signal pending on multiple
* threads, make sure we take it before changing the action.
I think this is not needed. We should only worry about SIGNAL_GROUP_EXIT case,
bit it implies a pending SIGKILL which can't be cleared by do_sigaction.
Kill this special case.
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
--- t/kernel/signal.c~SA_NOPEND 2007-08-20 19:40:31.000000000 +0400
+++ t/kernel/signal.c 2007-08-20 19:43:41.000000000 +0400
@@ -2300,15 +2300,6 @@ int do_sigaction(int sig, struct k_sigac
k = ¤t->sighand->action[sig-1];
spin_lock_irq(¤t->sighand->siglock);
- if (signal_pending(current)) {
- /*
- * If there might be a fatal signal pending on multiple
- * threads, make sure we take it before changing the action.
- */
- spin_unlock_irq(¤t->sighand->siglock);
- return -ERESTARTNOINTR;
- }
-
if (oact)
*oact = *k;
next reply other threads:[~2007-08-20 15:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-20 16:01 Oleg Nesterov [this message]
2007-08-20 18:53 ` [PATCH] do_sigaction: don't worry about signal_pending() Roland McGrath
2007-08-22 9:43 ` Jarek Poplawski
2007-08-22 10:02 ` Oleg Nesterov
2007-08-22 10:53 ` Jarek Poplawski
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=20070820160157.GA1279@tv-sign.ru \
--to=oleg@tv-sign.ru \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=roland@redhat.com \
/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