Commit edd9f723 authored by Vladimir Davydov's avatar Vladimir Davydov Committed by Linus Torvalds
Browse files

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: 3ef22dff

 ("oom, oom_reaper: try to reap tasks which skip regular OOM killer path")Signed-off-by: Vladimir Davydov <>
Acked-by: default avatarMichal Hocko <>
Cc: Tetsuo Handa <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 9ecd10b7
......@@ -611,8 +611,6 @@ void try_oom_reaper(struct task_struct *tsk)
if (!process_shares_mm(p, mm))
if (same_thread_group(p, tsk))
if (fatal_signal_pending(p))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment