Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4051676ybl; Mon, 13 Jan 2020 07:05:32 -0800 (PST) X-Google-Smtp-Source: APXvYqzFjiWWNRHKQYwA8IK0UaeqPSZL+EUC6oIS8+MPTJPxUbOydB7h2YSal/V2GxCoxIuhvaXG X-Received: by 2002:aca:c74e:: with SMTP id x75mr13389907oif.140.1578927932137; Mon, 13 Jan 2020 07:05:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578927932; cv=none; d=google.com; s=arc-20160816; b=0YcWqWtFB20A2DqZ917Xl0eTCFhjJNw3SAOATA2vKpru8Y4WC8WRB6u2IN/oexcsbe 174a2naIAFLjElNsNkUpc0fJCg8B2BOhrRFzStIO9HnDTfPnXpW78p0wJl0VyFB06eCt gQhoNMF3e168w8ZFWDFk5Q4K6wEoGIO5JXriLosBADeiBP+O/qk0oi5oOgcLgwZM5Awb aTP4CtPmD6TDMgsI2MJVRSTssQKlm96J78tBvljj/gz/iMicKssAhoFALWkPYB3Gy0yc 3RRhkQBBp/aSPtxY1sdrRjEtUeEzuZ6ftoPzO324dEixItkxKNtG43yihVMv8U5zUadV sH7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=+Mu9cVT0w3tjYLKxEedKcsQl/A5xNhV9LInYjUG/anI=; b=ekpEorvpy5or0PyWZVRSsfpiCoko7RPi/QqJmytFbNJ/5Z53y/19YIx/tijfbdwByC YXvvFN2BKCUAcJmVORrKQZfvdMG04fa2TRbi/x+VikNjrTPNiLX97HhM2rrmhYtKeXHS Z33xwq1fLp7IFPLnsWapkdK+NzpP8Dbja87qBNuxFid7rgEID0jRD2hzCsQTspWGLj2b 2oW5IpwI9TkFWI5k3O4yvtKamggH8+TkPBD76N9SaKPaJb3/IrLBE1SrlCkisEnqOYA+ 4Ct551SK3j4xqIEBqU86yPBg+PxowTq7n/c1ESg/bFckzB0pTeWQQbYHh8dmBTAIQD4g RcoA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j16si6906662otr.190.2020.01.13.07.05.18; Mon, 13 Jan 2020 07:05:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729033AbgAMPCv (ORCPT + 99 others); Mon, 13 Jan 2020 10:02:51 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:50661 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726567AbgAMPCv (ORCPT ); Mon, 13 Jan 2020 10:02:51 -0500 Received: from mail-qt1-f182.google.com ([209.85.160.182]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPSA (Nemesis) id 1M7sM0-1inBU31ZIo-0051YL; Mon, 13 Jan 2020 16:02:49 +0100 Received: by mail-qt1-f182.google.com with SMTP id d18so9307850qtj.10; Mon, 13 Jan 2020 07:02:49 -0800 (PST) X-Gm-Message-State: APjAAAWOGvDVfcGRfdFNDLMAfh646YVfQAVLtj/2GGcYkDqCNKcQi4lz hl1jf7gBxX9E6MT0jr8L23hzskrldX6YmgkbtXU= X-Received: by 2002:ac8:47d3:: with SMTP id d19mr14102091qtr.142.1578927768175; Mon, 13 Jan 2020 07:02:48 -0800 (PST) MIME-Version: 1.0 References: <20200107175927.4558-1-sargun@sargun.me> <20200107175927.4558-2-sargun@sargun.me> In-Reply-To: <20200107175927.4558-2-sargun@sargun.me> From: Arnd Bergmann Date: Mon, 13 Jan 2020 16:02:31 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v9 1/4] vfs, fdtable: Add fget_task helper To: Sargun Dhillon Cc: "linux-kernel@vger.kernel.org" , Linux Containers , Linux API , Linux FS-devel Mailing List , Tycho Andersen , Jann Horn , Aleksa Sarai , Christian Brauner , Oleg Nesterov , Andy Lutomirski , Al Viro , Gian-Carlo Pascutto , =?UTF-8?Q?Emilio_Cobos_=C3=81lvarez?= , Florian Weimer , Jed Davis Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:EazS39lBXe7l2MXTjvoN3t5fQWhLNgan09i4rpbG1Ror2bq23ZP gaK4s9swynMmEhrzadP23qax9Ft4zh4tRox6X3DXu2sB4W7wYUEcUURcDK8FCSlhm70Hp2M 3Hi5wndJwn9IO3b2a0H5/yL/6LCCbrbdi74YxzI/CiBydYGlklxAeuqtJi8iw9v1fLWxwtK L7bkNbOgof36eZzGjegsA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:DzF3lkCw0C0=:T6j1HF4d6Cj5rxi0G7MhBt s6EZ3WerxgZCSYsy2blIJJpGCLjBKypdL9Cl48ryGAUYCXYw+3b85YR/YCNlhQcbqAP8U8fq7 0KTtSpy4FPf5sdwVRZ6GbitVJwuWlugU7E0Haw3lcfZVU+Vxd9E63ktH8eslFL2dGV73MFANe zB1SPq8K7a3/aVFZH2VoB/cmjQKiFRvmlp1Jn8BU9JtKR8j8Z/lBABsnkUSufvmOnPQi5Dn4+ CU9Smt1rT8+RU9TV8D0qVO23POvvETdkqeWn+IE6Wh78fgq65PnyEzi1TntV7SjIiGa24QtLf LJsAHg4ybvzs5wOoYLdyNJGWavtHDvstxhquSirN+8qBofKkdd74tWXK/EQvBpfREmmlpmt0A +dTVwvMU8tc5bihkYim3JKxTCB5yAGUPLdtxtmPjSby9YXDrH9zjhOg4wubTmqYFLt4MlCeBT /tKChaKgzAxGG0jqRNTWXj88MPyY18uAvFcNE8tW5UDIqxXG5dv6cwcwpJIApSzrpZGFSbJr2 jahz1MTrCzfm6milvi2Y2wKFuMX+wd2cML5cR9BLn+rbNbDwuwPgOa2MV77gP/uEtxGVbW6BC Ig45p94v/PJKA5kYLyprtVzqCqJZxVxKJsFEcSMnKWtN0nuMPJzffS3HgFLA7XEmpXN+Wo71W 85z8JrBKCBG1O+Dt17yC6TFQnENPsIDYn7Oi9R6HmiMAPrw20eKqT16o5O1da8ZtIP8dZweht xpZx0zSPUq7mdL3wlW5JOeYu9VZg0ZvZfL6q9XEtaPKoWNp6bgYtxwEMl/O/g1omCSzTJ89My XNOWVTl0X/ysBZpfc2zrl2AiNKvqnyia3oIkveNiHXFTHjr2Z92n3Mpv9dl+uEOfgnVsBanP8 KlaV45aPLTFupKctzkiw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 7, 2020 at 6:59 PM Sargun Dhillon wrote: > > This introduces a function which can be used to fetch a file, given an > arbitrary task. As long as the user holds a reference (refcnt) to the > task_struct it is safe to call, and will either return NULL on failure, > or a pointer to the file, with a refcnt. > > This patch is based on Oleg Nesterov's (cf. [1]) patch from September > 2018. > > [1]: Link: https://lore.kernel.org/r/20180915160423.GA31461@redhat.com > > Signed-off-by: Sargun Dhillon > Suggested-by: Oleg Nesterov > Acked-by: Christian Brauner Reviewed-by: Arnd Bergmann