mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Fix signal race during process exit
Date: Thu, 3 Jun 2004 18:21:16 -0700	[thread overview]
Message-ID: <200406040121.i541LGAI012332@magilla.sf.frob.com> (raw)

Is there a reproducer case around so we can test fixes for this problem?

It seems to me that signals sent to an already dying task might as well
just be discarded anyway.  All they ever do now (except for trip bugs) is
change what pending signals you see in the /proc/pid/status entry for a
zombie.  What's wrong with this:

Index: linux-2.6/kernel/signal.c
===================================================================
RCS file: /home/roland/redhat/bkcvs/linux-2.5/kernel/signal.c,v
retrieving revision 1.120
diff -u -b -p -r1.120 signal.c
--- linux-2.6/kernel/signal.c 10 May 2004 20:28:20 -0000 1.120
+++ linux-2.6/kernel/signal.c 4 Jun 2004 01:16:31 -0000
@@ -161,6 +161,9 @@ static int sig_ignored(struct task_struc
 {
 	void * handler;
 
+	if (t->flags & PF_DEAD)
+		return 1;
+
 	/*
 	 * Tracers always want to know about signals..
 	 */



Thanks,
Roland

             reply	other threads:[~2004-06-04  1:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-04  1:21 Roland McGrath [this message]
2004-06-04  1:30 ` Andrew Morton
2004-06-10  1:48   ` Roland McGrath
2004-06-10  2:20     ` Andrew Morton
2004-06-10  2:51     ` Rusty Russell
  -- strict thread matches above, loose matches on Subject: below --
2004-06-02  2:13 Jeremy Kerr
2004-06-02  5:57 ` Andrew Morton
2004-06-02  6:49   ` Rusty Russell
2004-06-02  7:08     ` Andrew Morton
2004-06-02  7:16       ` Andrew Morton
2004-06-02  8:13         ` Jeremy Kerr

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=200406040121.i541LGAI012332@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=akpm@osdl.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®