Skip to content

Commit 270b654

Browse files
committed
exit: Coredumps reach do_group_exit
The comment about coredumps not reaching do_group_exit and the corresponding BUG_ON are bogus. What happens and has happened for years is that get_signal calls do_coredump (which sets SIGNAL_GROUP_EXIT and group_exit_code) and then do_group_exit passing the signal number. Then do_group_exit ignores the exit_code it is passed and uses signal->group_exit_code from the coredump. The comment and BUG_ON were correct when they were added during the 2.5 development cycle, but became obsolete and incorrect when get_signal was changed to fall through to do_group_exit after do_coredump in 2.6.10-rc2. So remove the stale comment and BUG_ON Fixes: 63bd614 ("[PATCH] Invalid BUG_ONs in signal.c") History-Tree: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git Link: https://lkml.kernel.org/r/20220103213312.9144-2-ebiederm@xmission.com Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
1 parent 2873cd3 commit 270b654

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

kernel/exit.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -911,8 +911,6 @@ do_group_exit(int exit_code)
911911
{
912912
struct signal_struct *sig = current->signal;
913913

914-
BUG_ON(exit_code & 0x80); /* core dumps don't get here */
915-
916914
if (sig->flags & SIGNAL_GROUP_EXIT)
917915
exit_code = sig->group_exit_code;
918916
else if (sig->group_exec_task)

0 commit comments

Comments
 (0)