From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754522AbaLBSFx (ORCPT ); Tue, 2 Dec 2014 13:05:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46233 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754071AbaLBSFw (ORCPT ); Tue, 2 Dec 2014 13:05:52 -0500 Date: Tue, 2 Dec 2014 19:05:29 +0100 From: Oleg Nesterov To: Michal Hocko Cc: Andrew Morton , Cong Wang , David Rientjes , "Rafael J. Wysocki" , Tejun Heo , linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] oom: kill the insufficient and no longer needed PT_TRACE_EXIT check Message-ID: <20141202180529.GB20314@redhat.com> References: <20141127230349.GA25075@redhat.com> <20141127230408.GA25100@redhat.com> <20141202093530.GC27014@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141202093530.GC27014@dhcp22.suse.cz> 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 On 12/02, Michal Hocko wrote: > > On Fri 28-11-14 00:04:08, Oleg Nesterov wrote: > > After the previous patch we can remove the PT_TRACE_EXIT check in > > oom_scan_process_thread(), it was added to handle the case when the > > coredumping was "frozen" by ptrace, but it doesn't really work. If > > nothing else, we would need to check all threads which could share > > the same ->mm to make it more or less correct. > > > > Signed-off-by: Oleg Nesterov > > I still do not see why we do not need task->ptrace & PT_TRACE_EXIT check > here. I do understand that the check on group_leader doesn't make much > sense. ptrace_event would block until the tracer let the task run again > which may be never AFAICS. No, note that PT_TRACE_EXIT (the last ptrace event) is reported before PF_EXITING is set. (just in case... we do have some problems with SIGKILL && ptrace, but this is completely off-topic and has nothing to do with oom-kill.c) Oleg.