浏览代码

do not change dead_task->exit_signal

__ptrace_detach() and do_notify_parent() set task->exit_signal = -1
to mark the task dead. This is no longer needed, nobody checks
exit_signal to detect the EXIT_DEAD task.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Tejun Heo <tj@kernel.org>
Oleg Nesterov 14 年之前
父节点
当前提交
d4f7c511c1
共有 2 个文件被更改,包括 0 次插入2 次删除
  1. 0 1
      kernel/ptrace.c
  2. 0 1
      kernel/signal.c

+ 0 - 1
kernel/ptrace.c

@@ -384,7 +384,6 @@ static bool __ptrace_detach(struct task_struct *tracer, struct task_struct *p)
 			dead = do_notify_parent(p, p->exit_signal);
 			dead = do_notify_parent(p, p->exit_signal);
 		else if (ignoring_children(tracer->sighand)) {
 		else if (ignoring_children(tracer->sighand)) {
 			__wake_up_parent(p, tracer);
 			__wake_up_parent(p, tracer);
-			p->exit_signal = -1;
 			dead = true;
 			dead = true;
 		}
 		}
 	}
 	}

+ 0 - 1
kernel/signal.c

@@ -1650,7 +1650,6 @@ bool do_notify_parent(struct task_struct *tsk, int sig)
 		 * it, just use SIG_IGN instead).
 		 * it, just use SIG_IGN instead).
 		 */
 		 */
 		autoreap = true;
 		autoreap = true;
-		tsk->exit_signal = -1;
 		if (psig->action[SIGCHLD-1].sa.sa_handler == SIG_IGN)
 		if (psig->action[SIGCHLD-1].sa.sa_handler == SIG_IGN)
 			sig = 0;
 			sig = 0;
 	}
 	}