]> git.baikalelectronics.ru Git - kernel.git/commit
exit: Fix the exit_code for wait_task_zombie
authorEric W. Biederman <ebiederm@xmission.com>
Tue, 21 Dec 2021 16:11:01 +0000 (10:11 -0600)
committerEric W. Biederman <ebiederm@xmission.com>
Sat, 8 Jan 2022 18:43:57 +0000 (12:43 -0600)
commit8c0980422f730ad22c4bc6b162e940229849afd6
tree07db65f1c185e9f4cb9b4960705de4126cd9b3bf
parente6a8c9fcfb672a7ee8f51b9c506ee2ee13f0302f
exit: Fix the exit_code for wait_task_zombie

The function wait_task_zombie is defined to always returns the process not
thread exit status.  Unfortunately when process group exit support
was added to wait_task_zombie the WNOWAIT case was overlooked.

Usually tsk->exit_code and tsk->signal->group_exit_code will be in sync
so fixing this is bug probably has no effect in practice.  But fix
it anyway so that people aren't scratching their heads about why
the two code paths are different.

History-Tree: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git
Fixes: 2c66151cbc2c ("[PATCH] sys_exit() threading improvements, BK-curr")
Link: https://lkml.kernel.org/r/20220103213312.9144-3-ebiederm@xmission.com
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
kernel/exit.c