From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754692AbcHWQln (ORCPT ); Tue, 23 Aug 2016 12:41:43 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42342 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753745AbcHWQll (ORCPT ); Tue, 23 Aug 2016 12:41:41 -0400 Date: Tue, 23 Aug 2016 18:32:34 +0200 From: Oleg Nesterov To: Michal Hocko Cc: Andrew Morton , linux-mm@kvack.org, LKML , Michal Hocko , Roland McGrath , Andreas Schwab , William Preston Subject: Re: [PATCH v2] kernel/fork: fix CLONE_CHILD_CLEARTID regression in nscd Message-ID: <20160823163233.GA7123@redhat.com> References: <1471968749-26173-1-git-send-email-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1471968749-26173-1-git-send-email-mhocko@kernel.org> User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 23 Aug 2016 16:32:58 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/23, Michal Hocko wrote: > > --- a/kernel/fork.c > +++ b/kernel/fork.c > @@ -913,14 +913,11 @@ void mm_release(struct task_struct *tsk, struct mm_struct *mm) > deactivate_mm(tsk, mm); > > /* > - * If we're exiting normally, clear a user-space tid field if > - * requested. We leave this alone when dying by signal, to leave > - * the value intact in a core dump, and to save the unnecessary > - * trouble, say, a killed vfork parent shouldn't touch this mm. > - * Userland only wants this done for a sys_exit. > + * Signal userspace if we're not exiting with a core dump > + * or a killed vfork parent which shouldn't touch this mm. Well. ACK, but the comment looks wrong... The "killed vfork parent ..." part should be removed, as you pointed out this is no longer true. OTOH, to me it would be better to not remove the "leave the value intact in a core dump" part, otherwise the " we're not exiting with a core dump" looks pointless because SIGNAL_GROUP_COREDUMP is self- documenting. Oleg.