[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250113.shaonge7xieT@digikod.net>
Date: Mon, 13 Jan 2025 17:55:20 +0100
From: Mickaël Salaün <mic@...ikod.net>
To: Christian Brauner <brauner@...nel.org>
Cc: Jann Horn <jannh@...gle.com>, Al Viro <viro@...iv.linux.org.uk>,
Eric Paris <eparis@...hat.com>, Paul Moore <paul@...l-moore.com>,
Günther Noack <gnoack@...gle.com>, "Serge E . Hallyn" <serge@...lyn.com>,
Ben Scarlato <akhna@...gle.com>, Casey Schaufler <casey@...aufler-ca.com>,
Charles Zaffery <czaffery@...lox.com>, Daniel Burgener <dburgener@...ux.microsoft.com>,
Francis Laniel <flaniel@...ux.microsoft.com>, James Morris <jmorris@...ei.org>, Jeff Xu <jeffxu@...gle.com>,
Jorge Lucangeli Obes <jorgelo@...gle.com>, Kees Cook <kees@...nel.org>,
Konstantin Meskhidze <konstantin.meskhidze@...wei.com>, Matt Bobrowski <mattbobrowski@...gle.com>,
Mikhail Ivanov <ivanov.mikhail1@...wei-partners.com>, Phil Sutter <phil@....cc>,
Praveen K Paladugu <prapal@...ux.microsoft.com>, Robert Salvet <robert.salvet@...lox.com>,
Shervin Oloumi <enlightened@...gle.com>, Song Liu <song@...nel.org>,
Tahera Fahimi <fahimitahera@...il.com>, Tyler Hicks <code@...icks.com>, audit@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-security-module@...r.kernel.org,
Jeff Layton <jlayton@...nel.org>, Josef Bacik <josef@...icpanda.com>
Subject: Re: [PATCH v4 27/30] fs: Add iput() cleanup helper
On Mon, Jan 13, 2025 at 04:00:31PM +0100, Christian Brauner wrote:
> On Mon, Jan 13, 2025 at 03:00:20PM +0100, Jann Horn wrote:
> > On Wed, Jan 8, 2025 at 4:44 PM Mickaël Salaün <mic@...ikod.net> wrote:
> > > Add a simple scope-based helper to put an inode reference, similar to
> > > the fput() helper.
> >
> > Cleaning up inode references with scope-based cleanup seems dangerous
> > to me because, unlike most resources, holding a reference to an inode
> > beyond the lifetime of the associated superblock can actually cause
> > memory corruption; and scope-based cleanup is designed based on the
> > idea that the order and precise location of dropping a reference don't
> > matter so much.
>
> That's in general a good point and I know there's been opposition to
> this in the past when we discussed this. So fine by me.
Right, I'll use __free(path_put) instead.
Powered by blists - more mailing lists