Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2974395pxa; Tue, 18 Aug 2020 03:11:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjmKfLQP8y/5xwggYU9Dq0vWsClhdu6uiaY+hQLrs4+YvXIpL7tkCVCvkd4GmdUoDTnHXk X-Received: by 2002:a17:906:845:: with SMTP id f5mr18912368ejd.34.1597745489844; Tue, 18 Aug 2020 03:11:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597745489; cv=none; d=google.com; s=arc-20160816; b=DNsty5YnldkyKIgOpXjHfMlkAreowL0oXljQhX1f4fSSGs6G46qNPoZLq1Ju/sAsg5 smr7WEp3GKHv7Xvsr3KXfcVfEz9N4b8Po44ZJn/Nud3ebEmWLyCm2fMNutm8UzaHIJMG /LJsqCB4SX6TVCspAM8vQl+jUpUHuYyRmKex+ckKaiI+tqTZmiHlqdQc11YNoiiiK7Ef 5+0PrjcUpuET/ktzZUBFAh2nYq57m7B4XNhhknB9wLTz4Oi6FdVA3Tfb016fFH3w+dyf rQ3Izfe+gq0owfTgASi4pRqF2bACAk9u92HclZvQvesqNiNBd+reQ1biKLtgAyDAXNPB G9Tg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=BYUnzN2DHi8Az363fkNMp5cH55DKDl7lHk3BprVal3Y=; b=g9P1r9olZ1GnERF9Mag/yocBFszNUSQ7IXl3rteW+t8gd58ATkTP9KSkciidlQWUr8 plUZXrn9hecnwr0MJ4IDrka8SzvMKpV6WgrptNL/poncyxA8IHHah8IvT189EEgKCwzI hh5APnNKXoOgrCvn29pINN59gQjpRRP6nu72H+v+lYrlv2uOTjqtrF7aeoQnpzqCZ+tw N5JrNQIck2DGPVnJv9Icb7WRRzTRABalTSnDK6EhY26zbQsnHHjN/4s8RCs9qbNIBBd2 flAJgRV1Vg6wsjMUPBrVH8p4t2UDtZkjyPpIjAn7eg0PGaZehSc4etKSvhj9YCSzfh6M 99/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cm21si12866478edb.111.2020.08.18.03.11.05; Tue, 18 Aug 2020 03:11:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726605AbgHRKI1 (ORCPT + 99 others); Tue, 18 Aug 2020 06:08:27 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:37837 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726043AbgHRKI1 (ORCPT ); Tue, 18 Aug 2020 06:08:27 -0400 Received: from ip5f5af70b.dynamic.kabel-deutschland.de ([95.90.247.11] helo=wittgenstein) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1k7yXW-0000UF-Pc; Tue, 18 Aug 2020 10:08:22 +0000 Date: Tue, 18 Aug 2020 12:08:21 +0200 From: Christian Brauner To: "Eric W. Biederman" Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, criu@openvz.org, bpf@vger.kernel.org, Linus Torvalds , Alexander Viro , Oleg Nesterov , Cyrill Gorcunov , Jann Horn , Kees Cook , Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= , Jeff Layton , Miklos Szeredi , Matthew Wilcox , "J. Bruce Fields" , Matthew Wilcox , Trond Myklebust , Chris Wright , Alexei Starovoitov , Daniel Borkmann , Martin KaFai Lau , Song Liu , Yonghong Song , Andrii Nakryiko , John Fastabend , KP Singh Subject: Re: [PATCH 02/17] exec: Simplify unshare_files Message-ID: <20200818100821.lvxkmw3l5bs56bls@wittgenstein> References: <87ft8l6ic3.fsf@x220.int.ebiederm.org> <20200817220425.9389-2-ebiederm@xmission.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20200817220425.9389-2-ebiederm@xmission.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 17, 2020 at 05:04:10PM -0500, Eric W. Biederman wrote: > Now that exec no longer needs to return the unshared files to their > previous value there is no reason to return displaced. > > Instead when unshare_fd creates a copy of the file table, call > put_files_struct before returning from unshare_files. > > Signed-off-by: "Eric W. Biederman" > --- Looks good. Acked-by: Christian Brauner