From: Oleg Nesterov Date: Wed, 30 Apr 2008 07:53:12 +0000 (-0700) Subject: document de_thread() with exit_notify() connection X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2800d8d19e51414403df8144eaa214bb03400b87;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git document de_thread() with exit_notify() connection Add a couple of small comments, it is not easy to see what this code does. Signed-off-by: Oleg Nesterov Cc: Roland McGrath Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/exec.c b/fs/exec.c index 8fccc276d40d..9f9f931ef949 100644 --- a/fs/exec.c +++ b/fs/exec.c @@ -798,7 +798,7 @@ static int de_thread(struct task_struct *tsk) if (!thread_group_leader(tsk)) { leader = tsk->group_leader; - sig->notify_count = -1; + sig->notify_count = -1; /* for exit_notify() */ for (;;) { write_lock_irq(&tasklist_lock); if (likely(leader->exit_state)) diff --git a/kernel/exit.c b/kernel/exit.c index 413c81ec858e..879ed6e1c883 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -877,6 +877,7 @@ static void exit_notify(struct task_struct *tsk, int group_dead) state = EXIT_DEAD; tsk->exit_state = state; + /* mt-exec, de_thread() is waiting for us */ if (thread_group_leader(tsk) && tsk->signal->notify_count < 0 && tsk->signal->group_exit_task)