Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

exit: fix misleading comment in forget_original_parent()

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.

Link: https://lkml.kernel.org/r/20250615030930.58051-1-wangfushuai@baidu.com
Signed-off-by: Fushuai Wang <wangfushuai@baidu.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Christian Brauner <brauner@kernel.org>
Cc: Mateusz Guzik <mjguzik@gmail.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Pasha Tatashin <pasha.tatashin@soleen.com>
Cc: wangfushuai <wangfushuai@baidu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Fushuai Wang and committed by
Andrew Morton
d71b90e5 ad2c8079

+1 -6
+1 -6
kernel/exit.c
··· 692 692 } 693 693 694 694 /* 695 - * This does two things: 696 - * 697 - * A. Make init inherit all the child processes 698 - * B. Check to see if any process groups have become orphaned 699 - * as a result of our exiting, and if they have any stopped 700 - * jobs, send them a SIGHUP and then a SIGCONT. (POSIX 3.2.2.2) 695 + * Make init inherit all the child processes 701 696 */ 702 697 static void forget_original_parent(struct task_struct *father, 703 698 struct list_head *dead)