Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp4041505pxb; Tue, 7 Sep 2021 13:20:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyk5unoaWTqWKHTpiafXr4TgmUiIj0rtjcnkbYZn2YacroRphBGj1yNW1cxdpZ7DFNr3Zqh X-Received: by 2002:aa7:d612:: with SMTP id c18mr52732edr.396.1631046023271; Tue, 07 Sep 2021 13:20:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631046023; cv=none; d=google.com; s=arc-20160816; b=bP/0ZzsmckpCtE/mN+fjVWWZnu9YxqzzxAD+KJKhVDbt28lwYfwWQKq/vHQoO+O0F0 8PM55s9rEUXgK7XmkHZtQCxwdmXIxu2f5pAwg1D2ei/cLvhifLbEpPjhl4SZiLqgK8hI MnrXGgTMfavir8Rqe6mfEsn0R2aALKJau9F/A1u3NvW4Ww7mnghx0Eru7ZkBHDEqNRo2 XxmAZQcQB8mJtGMkpQeMqv4usRqIjxlI/1CeniHYNYG/QHtUScuXjurJ6cbLzXqz32dh kkplm1ttStfql0i1wAiua1hF4XdVOskFjZscd0e3dXzftiIxal3DSD58M6Huz81D+0Y8 yEPQ== 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=b3lNEebDaKyYGG5LKwf+yD1akHlkt1qnoIO1V1LUMQs=; b=rgQ4dy60Xt9Iq8WzvS9Jf2IFwjjra5ovPw+hw4RCiodwWS/Bkfwun39WwFvPpIU0TI o50Nvor4SQHhvR13z0oaguOES2YWZrn555Xl5E0ZnTP88nr+C2F5LzreV5vYizEEqdZl CRWlqxQA95VBbdSyj/YJXYKA3kFoFk6+tvtFrWPj7fN/rdGL37aoxXHun+meevPV6fiV ovyaNaw909xgAS6czhODohK3eXJ1Sl3hD2zylVa06ONaeperjW0aawOTdd0UF9Jfcltg nFzdhEsnobF/yy30uEwb5t/4/qrlKlS2REIKTUmzh5hbbSqkUt1rMhCrXRwuKBpqxvgv 7UHQ== 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 13si11987438eji.682.2021.09.07.13.20.00; Tue, 07 Sep 2021 13:20:23 -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 S1346555AbhIGUQv (ORCPT + 99 others); Tue, 7 Sep 2021 16:16:51 -0400 Received: from zeniv-ca.linux.org.uk ([142.44.231.140]:48290 "EHLO zeniv-ca.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344901AbhIGUQu (ORCPT ); Tue, 7 Sep 2021 16:16:50 -0400 Received: from viro by zeniv-ca.linux.org.uk with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mNhTF-00278w-GQ; Tue, 07 Sep 2021 20:13:29 +0000 Date: Tue, 7 Sep 2021 20:13:29 +0000 From: Al Viro To: Stephen Brennan Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 3/3] namei: Standardize callers of filename_create() Message-ID: References: <20210901175144.121048-1-stephen.s.brennan@oracle.com> <20210901175144.121048-4-stephen.s.brennan@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210901175144.121048-4-stephen.s.brennan@oracle.com> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 01, 2021 at 10:51:43AM -0700, Stephen Brennan wrote: > inline struct dentry *user_path_create(int dfd, const char __user *pathname, > struct path *path, unsigned int lookup_flags) > { > - return filename_create(dfd, getname(pathname), path, lookup_flags); > + struct filename *filename; > + struct dentry *dentry; > + > + filename = getname(pathname); > + dentry = filename_create(dfd, getname(pathname), path, lookup_flags); > + putname(filename); > + return dentry; Leaks, obviously...