Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753613Ab0FDLgS (ORCPT ); Fri, 4 Jun 2010 07:36:18 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57745 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752394Ab0FDLgR (ORCPT ); Fri, 4 Jun 2010 07:36:17 -0400 Date: Fri, 4 Jun 2010 13:34:25 +0200 From: Oleg Nesterov To: KOSAKI Motohiro Cc: Roland McGrath , LKML , linux-mm , David Rientjes , Andrew Morton , KAMEZAWA Hiroyuki , Nick Piggin Subject: Re: [PATCH] oom: Make coredump interruptible Message-ID: <20100604113425.GA13801@redhat.com> References: <20100602185812.4B5894A549@magilla.sf.frob.com> <20100602203827.GA29244@redhat.com> <20100604194635.72D3.A69D9226@jp.fujitsu.com> <20100604112721.GA12582@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100604112721.GA12582@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 Content-Length: 944 Lines: 27 On 06/04, Oleg Nesterov wrote: > > (I'd suggest you to add a note into the changelog, to explain > that the new flag makes sense even without coredump problems). And. May I ask you to add another note into the changelog? > > @@ -410,6 +409,8 @@ static int __oom_kill_process(struct task_struct *p, struct mem_cgroup *mem, > > */ > > p->rt.time_slice = HZ; > > set_tsk_thread_flag(p, TIF_MEMDIE); > > + set_bit(MMF_OOM_KILLED, &p->mm->flags); I think the changelog should explain that, if we race with fork(), this flag can't leak into the child's new mm. mm_init() filters the bits outside of MMF_INIT_MASK. If we race with exec, it can't leak because mm_alloc() does memset(0). Oleg. -- 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/