diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2021-11-19 11:29:48 -0600 |
---|---|---|
committer | Eric W. Biederman <ebiederm@xmission.com> | 2022-01-08 11:36:24 -0600 |
commit | 98b24b16b2aebffabf5b8670f44f19666c1e029f (patch) | |
tree | f2118f38256d24d330df4d423db86e5b02b88892 /mm | |
parent | de77c3a5b95c95a4915142071643d94e3e1ada35 (diff) | |
download | linux-stable-98b24b16b2aebffabf5b8670f44f19666c1e029f.tar.gz linux-stable-98b24b16b2aebffabf5b8670f44f19666c1e029f.tar.bz2 linux-stable-98b24b16b2aebffabf5b8670f44f19666c1e029f.zip |
signal: Have the oom killer detect coredumps using signal->core_state
In preparation for removing the flag SIGNAL_GROUP_COREDUMP, change
__task_will_free_mem to test signal->core_state instead of the flag
SIGNAL_GROUP_COREDUMP.
Both fields are protected by siglock and both live in signal_struct so
there are no real tradeoffs here, just a change to which field is
being tested.
Link: https://lkml.kernel.org/r/20211213225350.27481-3-ebiederm@xmission.com
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/oom_kill.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 1ddabefcfb5a..5c92aad8ca1a 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -793,7 +793,7 @@ static inline bool __task_will_free_mem(struct task_struct *task) * coredump_task_exit(), so the oom killer cannot assume that * the process will promptly exit and release memory. */ - if (sig->flags & SIGNAL_GROUP_COREDUMP) + if (sig->core_state) return false; if (sig->flags & SIGNAL_GROUP_EXIT) |