From: Tyler Hicks <code@tyhicks.com>
To: Thorsten Blum <thorsten.blum@linux.dev>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
Ard Biesheuvel <ardb@kernel.org>,
Zipeng Zhang <zhangzipeng0@foxmail.com>,
Christian Brauner <brauner@kernel.org>,
Eric Biggers <ebiggers@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
stable@vger.kernel.org, ecryptfs@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ecryptfs: Add missing gotos in ecryptfs_read_metadata
Date: Mon, 12 Jan 2026 13:23:30 -0600 [thread overview]
Message-ID: <aWVKMoUMBwnYWCPw@yaupon> (raw)
In-Reply-To: <5DD6E30E-4974-42D9-86CF-A6A78CF0492E@linux.dev>
On 2026-01-11 13:28:17, Thorsten Blum wrote:
> On 11. Jan 2026, at 02:08, Al Viro wrote:
> > On Sun, Jan 11, 2026 at 01:36:52AM +0100, Thorsten Blum wrote:
> >> Add two missing goto statements to exit ecryptfs_read_metadata() when an
> >> error occurs.
> >>
> >> The first goto is required; otherwise ECRYPTFS_METADATA_IN_XATTR may be
> >> set when xattr metadata is enabled even though parsing the metadata
> >> failed. The second goto is not strictly necessary, but it makes the
> >> error path explicit instead of relying on falling through to 'out'.
> >
> > Ugh... IMO the whole thing from the point we'd successfully allocated
> > the page to the point where we start to clear it ought to be in a separate
> > helper. Something like this, perhaps?
>
> I wanted to keep the fix simple, but I'm happy to refactor the function
> if that's preferred. Any preferences, Tyler?
I typically like the multi-patch approach of a minimal, easy-to-backport
fix first and then a more complete cleanup/improvement in the followup
patch(es).
Tyler
>
> Thanks,
> Thorsten
>
next prev parent reply other threads:[~2026-01-12 19:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-11 0:36 Thorsten Blum
2026-01-11 1:08 ` Al Viro
2026-01-11 12:28 ` Thorsten Blum
2026-01-12 19:23 ` Tyler Hicks [this message]
2026-01-12 19:21 ` Tyler Hicks
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aWVKMoUMBwnYWCPw@yaupon \
--to=code@tyhicks.com \
--cc=akpm@linux-foundation.org \
--cc=ardb@kernel.org \
--cc=brauner@kernel.org \
--cc=ebiggers@kernel.org \
--cc=ecryptfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=thorsten.blum@linux.dev \
--cc=viro@zeniv.linux.org.uk \
--cc=zhangzipeng0@foxmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®