Commit 08132d3d authored by Eric W. Biederman's avatar Eric W. Biederman Committed by Zhao Wenhui
Browse files

exit: Use the correct exit_code in /proc/<pid>/stat

mainline inclusion
from mainline-v5.17-rc1
commit 2d18f7f4
category: bugfix
bugzilla: https://gitee.com/src-openeuler/kernel/issues/I9E2EL
CVE: CVE-2024-26686

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2d18f7f456209ed8a8fc138b8bc535dbdaf84695

--------------------------------

Since do_proc_statt was modified to return process wide values instead
of per task values the exit_code calculation has never been updated.
Update it now to return the process wide exit_code when it is requested
and available.

History-Tree: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/history.git
Fixes: bf719d26a5c1 ("[PATCH] distinct tgid/tid CPU usage")
Link: https://lkml.kernel.org/r/20220103213312.9144-4-ebiederm@xmission.com


Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: default avatarZhao Wenhui <zhaowenhui8@huawei.com>
parent ab9b23cd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment