Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756780Ab1CHBZk (ORCPT ); Mon, 7 Mar 2011 20:25:40 -0500 Received: from fgwmail5.fujitsu.co.jp ([192.51.44.35]:35139 "EHLO fgwmail5.fujitsu.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754984Ab1CHBZj (ORCPT ); Mon, 7 Mar 2011 20:25:39 -0500 X-SecurityPolicyCheck-FJ: OK by FujitsuOutboundMailChecker v1.3.1 From: KOSAKI Motohiro To: Andrey Vagin Subject: Re: [PATCH rh6] mm: skip zombie in OOM-killer Cc: kosaki.motohiro@jp.fujitsu.com, Andrew Morton , David Rientjes , linux-mm@kvack.org, linux-kernel@vger.kernel.org In-Reply-To: <1299274256-2122-1-git-send-email-avagin@openvz.org> References: <1299274256-2122-1-git-send-email-avagin@openvz.org> Message-Id: <20110308102508.7E99.A69D9226@jp.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.50.07 [ja] Date: Tue, 8 Mar 2011 10:25:34 +0900 (JST) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1012 Lines: 31 > A parent may wait a memory and zombie will prevent killing another task. > > Signed-off-by: Andrey Vagin > --- > mm/oom_kill.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/mm/oom_kill.c b/mm/oom_kill.c > index 7dcca55..2fc554e 100644 > --- a/mm/oom_kill.c > +++ b/mm/oom_kill.c > @@ -311,7 +311,7 @@ static struct task_struct *select_bad_process(unsigned int *ppoints, > * blocked waiting for another task which itself is waiting > * for memory. Is there a better alternative? > */ > - if (test_tsk_thread_flag(p, TIF_MEMDIE)) > + if (test_tsk_thread_flag(p, TIF_MEMDIE) && p->mm) > return ERR_PTR(-1UL); OK. Good catch. Reviewed-by: KOSAKI Motohiro -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/