From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752803AbbCOOyf (ORCPT ); Sun, 15 Mar 2015 10:54:35 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56785 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752517AbbCOOyd (ORCPT ); Sun, 15 Mar 2015 10:54:33 -0400 Date: Sun, 15 Mar 2015 15:52:23 +0100 From: Oleg Nesterov To: Josh Triplett Cc: Al Viro , Andrew Morton , Andy Lutomirski , Ingo Molnar , Kees Cook , "Paul E. McKenney" , "H. Peter Anvin" , Rik van Riel , Thomas Gleixner , Michael Kerrisk , Thiago Macieira , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH v2 5/7] clone4: Add a CLONE_AUTOREAP flag to automatically reap the child process Message-ID: <20150315145223.GA21887@redhat.com> References: <6d002995485d446e659105f6931307f3e532ce89.1426376419.git.josh@joshtriplett.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6d002995485d446e659105f6931307f3e532ce89.1426376419.git.josh@joshtriplett.org> 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 03/15, Josh Triplett wrote: > > Add a CLONE_AUTOREAP flag to request this behavior unconditionally, Yes, CLONE_AUTOREAP is much better. And I agree (mostly) with that we should rely on do_notify_parent(). Howver the patch still doesn't look right. First of all, ->autoreap should be per-process, not per-thread. And there are ptrace/mt issues, it seems. Just for example, we should avoid EXIT_TRACE if autoreap in wait_task_zombie() even if we are going to re-notify parent. Yes... and other problems with ptrace. So let me nack this patch for the moment ;) But let me repeat that personally I agree with this change "in general". EXCEPT: do we really want SIGCHLD from the exiting child? I think we do not. I won't really argue though, but this should be discussed and documented. IIUC, with your patch it is still sent. Josh, please give me some time to think and re-check, I'll write another email next week. I am not sure this is really needed, but it seems to me that we need the preparation patch to make this change clear/simple. Oleg.