[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250113-endlos-lerche-e1958bd9ce32@brauner>
Date: Mon, 13 Jan 2025 16:00:31 +0100
From: Christian Brauner <brauner@...nel.org>
To: Jann Horn <jannh@...gle.com>
Cc: Mickaël Salaün <mic@...ikod.net>,
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 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.
Powered by blists - more mailing lists