[PATCH] exit: fix misleading comment in forget_original_parent()

Fushuai Wang posted 1 patch 3 months, 3 weeks ago
kernel/exit.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
[PATCH] exit: fix misleading comment in forget_original_parent()
Posted by Fushuai Wang 3 months, 3 weeks ago
The commit 482a3767e508 ("exit: reparent: call forget_original_parent()
under tasklist_lock") moved the comment from exit_notify() to
forget_original_parent(). However, the forget_original_parent() only
handles (A), while (B) is handled in kill_orphaned_pgrp(). So remove
the unrelated part.

Signed-off-by: Fushuai Wang <wangfushuai@baidu.com>
---
 kernel/exit.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/kernel/exit.c b/kernel/exit.c
index bd743900354c..a7ba9178fe34 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -692,12 +692,7 @@ static void reparent_leader(struct task_struct *father, struct task_struct *p,
 }
 
 /*
- * This does two things:
- *
- * A.  Make init inherit all the child processes
- * B.  Check to see if any process groups have become orphaned
- *	as a result of our exiting, and if they have any stopped
- *	jobs, send them a SIGHUP and then a SIGCONT.  (POSIX 3.2.2.2)
+ * Make init inherit all the child processes
  */
 static void forget_original_parent(struct task_struct *father,
 					struct list_head *dead)
-- 
2.36.1
Re: [PATCH] exit: fix misleading comment in forget_original_parent()
Posted by Oleg Nesterov 3 months, 3 weeks ago
On 06/15, Fushuai Wang wrote:
>
> The commit 482a3767e508 ("exit: reparent: call forget_original_parent()
> under tasklist_lock") moved the comment from exit_notify() to
> forget_original_parent(). However, the forget_original_parent() only
> handles (A), while (B) is handled in kill_orphaned_pgrp(). So remove
> the unrelated part.
>
> Signed-off-by: Fushuai Wang <wangfushuai@baidu.com>

Acked-by: Oleg Nesterov <oleg@redhat.com>