From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com ([209.132.183.28]:56928 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728016AbeIQVvs (ORCPT ); Mon, 17 Sep 2018 17:51:48 -0400 Date: Mon, 17 Sep 2018 18:23:42 +0200 From: Oleg Nesterov To: "Eric W. Biederman" Cc: Jeff Layton , viro@zeniv.linux.org.uk, berrange@redhat.com, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC][PATCH 2/3] exec: Simplify unshare_files Message-ID: <20180917162342.GB25565@redhat.com> References: <20180914105310.6454-1-jlayton@kernel.org> <87a7ohs5ow.fsf@xmission.com> <87y3c1qr1g.fsf_-_@xmission.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87y3c1qr1g.fsf_-_@xmission.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: absolutely off-topic question, On 09/16, Eric W. Biederman wrote: > > @@ -747,11 +746,9 @@ void do_coredump(const siginfo_t *siginfo) > } > > /* get us an unshared descriptor table; almost always a no-op */ > - retval = unshare_files(&displaced); > + retval = unshare_files(); I fail to understand why do_coredump() needs unshare_files(). Could someone explain? And "almost always a no-op" above is not true, this is never a no-op in mt case; other (killed) threads sleep in exit_mm() which is called before exit_files(). Oleg.