From: Oleg Nesterov Date: Fri, 6 Nov 2015 02:48:20 +0000 (-0800) Subject: mm/oom_kill: remove the wrong fatal_signal_pending() check in oom_kill_process() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0c1b2d783cf3432490bf1e532c742fffeadc0bf3;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git mm/oom_kill: remove the wrong fatal_signal_pending() check in oom_kill_process() The fatal_signal_pending() was added to suppress unnecessary "sharing same memory" message, but it can't 100% help anyway because it can be false-negative; SIGKILL can be already dequeued. And worse, it can be false-positive due to exec or coredump. exec is mostly fine, but coredump is not. It is possible that the group leader has the pending SIGKILL because its sub-thread originated the coredump, in this case we must not skip this process. We could probably add the additional ->group_exit_task check but this patch just removes the wrong check along with pr_info(). Signed-off-by: Oleg Nesterov Acked-by: David Rientjes Acked-by: Tetsuo Handa Acked-by: Michal Hocko Cc: Kyle Walker Cc: Stanislav Kozina Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 58f3d2748ced..c837d06dce5a 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -579,11 +579,7 @@ void oom_kill_process(struct oom_control *oc, struct task_struct *p, !(p->flags & PF_KTHREAD)) { if (p->signal->oom_score_adj == OOM_SCORE_ADJ_MIN) continue; - if (fatal_signal_pending(p)) - continue; - pr_info("Kill process %d (%s) sharing same memory\n", - task_pid_nr(p), p->comm); do_send_sig_info(SIGKILL, SEND_SIG_FORCED, p, true); } rcu_read_unlock();