From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932931AbbI3S1R (ORCPT ); Wed, 30 Sep 2015 14:27:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41123 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932190AbbI3S1P (ORCPT ); Wed, 30 Sep 2015 14:27:15 -0400 Date: Wed, 30 Sep 2015 20:24:05 +0200 From: Oleg Nesterov To: Andrew Morton Cc: David Rientjes , Kyle Walker , Michal Hocko , Stanislav Kozina , Tetsuo Handa , linux-kernel@vger.kernel.org Subject: [PATCH -mm v2 1/3] mm/oom_kill: remove the wrong fatal_signal_pending() check in oom_kill_process() Message-ID: <20150930182405.GA15238@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150930182341.GA15047@redhat.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 pach just removes the wrong check along with pr_info(). Signed-off-by: Oleg Nesterov --- mm/oom_kill.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/mm/oom_kill.c b/mm/oom_kill.c index 4766e25..b6b8c78 100644 --- a/mm/oom_kill.c +++ b/mm/oom_kill.c @@ -588,11 +588,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(); -- 2.4.3