Re: [PATCH] Fix signal race during process exit

From: Roland McGrath
Date: Thu Jun 03 2004 - 20:22:11 EST


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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/