From: Andrew Morton <akpm@osdl.org>
To: Roland McGrath <roland@redhat.com>
Cc: linux-kernel@vger.kernel.org, Jeremy Kerr <jk@ozlabs.org>
Subject: Re: [PATCH] Fix signal race during process exit
Date: Thu, 3 Jun 2004 18:30:44 -0700 [thread overview]
Message-ID: <20040603183044.40e4a95c.akpm@osdl.org> (raw)
In-Reply-To: <200406040121.i541LGAI012332@magilla.sf.frob.com>
Roland McGrath <roland@redhat.com> wrote:
>
> Is there a reproducer case around so we can test fixes for this problem?
Jeremy would have the details.
> 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;
> +
I'm not sure about the locking here. What happens if the task starts
exitting immediately after the above test?
Plus the above adds code to the delivery fastpath, rather than exit().
If we're going to do the above for other reasons (what are they?) then it
would be neater to add a new PF_NO_SIGNALS rather than overloading PF_DEAD.
next prev parent reply other threads:[~2004-06-04 1:31 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-04 1:21 Roland McGrath
2004-06-04 1:30 ` Andrew Morton [this message]
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=20040603183044.40e4a95c.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=jk@ozlabs.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
all inboxes | Powered by JetHome®