From: Chris Wright Date: Mon, 14 Nov 2005 03:23:45 +0000 (-0800) Subject: Add Oleg's fix for subthread exit when ptrace set and parent ignores SIGCHLD X-Git-Tag: v2.6.14.3~12^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3e5301d82d050dffd873209996e203c3552c6b2b;p=thirdparty%2Fkernel%2Fstable-queue.git Add Oleg's fix for subthread exit when ptrace set and parent ignores SIGCHLD --- diff --git a/queue/ptrace-auto-reap-fix.patch b/queue/ptrace-auto-reap-fix.patch new file mode 100644 index 00000000000..9402b0170fe --- /dev/null +++ b/queue/ptrace-auto-reap-fix.patch @@ -0,0 +1,28 @@ +From nobody Mon Sep 17 00:00:00 2001 +Subject: [PATCH] Don't auto-reap traced children +From: Oleg Nesterov +Date: 1131632538 +0300 + +If a task is being traced we never auto-reap it even if it might look +like its parent doesn't care. The tracer obviously _does_ care. + +Signed-off-by: Linus Torvalds +Signed-off-by: Chris Wright +--- + + kernel/signal.c | 2 +- + 1 files changed, 1 insertion(+), 1 deletion(-) + +Index: linux-2.6.14.y/kernel/signal.c +=================================================================== +--- linux-2.6.14.y.orig/kernel/signal.c ++++ linux-2.6.14.y/kernel/signal.c +@@ -1524,7 +1524,7 @@ void do_notify_parent(struct task_struct + + psig = tsk->parent->sighand; + spin_lock_irqsave(&psig->siglock, flags); +- if (sig == SIGCHLD && ++ if (!tsk->ptrace && sig == SIGCHLD && + (psig->action[SIGCHLD-1].sa.sa_handler == SIG_IGN || + (psig->action[SIGCHLD-1].sa.sa_flags & SA_NOCLDWAIT))) { + /* diff --git a/queue/series b/queue/series index 4a1a2e3ab8b..ec6ff0414b9 100644 --- a/queue/series +++ b/queue/series @@ -1 +1,2 @@ ppc64-memory-model-depends-on-NUMA.patch +ptrace-auto-reap-fix.patch