From: Vladimir Davydov Date: Fri, 27 May 2016 21:27:21 +0000 (-0700) Subject: mm: oom: do not reap task if there are live threads in threadgroup X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=edd9f7230f591b7988533b1cafb07f3c03555f19;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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. Link: http://lkml.kernel.org/r/1464087628-7318-1-git-send-email-vdavydov@virtuozzo.com Fixes: 3ef22dfff239 ("oom, oom_reaper: try to reap tasks which skip regular OOM killer path")Signed-off-by: Vladimir Davydov Acked-by: Michal Hocko Cc: Tetsuo Handa Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 5bb2f7698ad7..326dd14938f0 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -611,8 +611,6 @@ void try_oom_reaper(struct task_struct *tsk) if (!process_shares_mm(p, mm)) continue; - if (same_thread_group(p, tsk)) - continue; if (fatal_signal_pending(p)) continue;