mm: oom: do not reap task if there are live threads in threadgroup
Subsystems (2)
[email protected]
maintainerPATCH 9/19 mm: oom: do not reap task if there are live threads in threadgroup
From: Vladimir Davydov <[email protected]>
Subject: mm: oom: do not reap task if there are live threads in threadgroup
If the current process is exiting, we don't invoke oom killer, instead we give it access to memory reserves and try to reap its mm in case nobody is going to use it. There's a mistake in the code performing this check - we just ignore any process of the same thread group no matter if it is exiting or not - see try_oom_reaper. Fix it.
Fixes 3ef22dfff239 ("oom, oom_reaper: try to reap tasks which skip regular OOM killer path")Signed-off-by: Vladimir Davydov <[email protected]>
Acked-by Michal Hocko <[email protected]>
Cc Tetsuo Handa <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
mm/oom_kill.c | 2 -- 1 file changed, 2 deletions(-)
mm/oom_kill.c renamed from mm/oom_kill.c~mm-oom-do-not-reap-task-if-there-are-live-threads-in-threadgroup +0 -2
@@ -611,8 +611,6 @@ void try_oom_reaper(struct task_struct *if (!process_shares_mm (p, mm))continue ; -if (same_thread_group (p, tsk)) -continue ;if (fatal_signal_pending (p))continue ;
_