mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thorsten Blum <thorsten.blum@linux.dev>
To: Al Viro <viro@zeniv.linux.org.uk>
Cc: Tyler Hicks <code@tyhicks.com>, Ard Biesheuvel <ardb@kernel.org>,
	Zipeng Zhang <zhangzipeng0@foxmail.com>,
	Christian Brauner <brauner@kernel.org>,
	Eric Biggers <ebiggers@kernel.org>,
	Michael Halcrow <mhalcrow@us.ibm.com>,
	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: Sun, 11 Jan 2026 13:28:17 +0100	[thread overview]
Message-ID: <5DD6E30E-4974-42D9-86CF-A6A78CF0492E@linux.dev> (raw)
In-Reply-To: <20260111010825.GG3634291@ZenIV>

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?

Thanks,
Thorsten


  reply	other threads:[~2026-01-11 12:29 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 [this message]
2026-01-12 19:23     ` Tyler Hicks
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=5DD6E30E-4974-42D9-86CF-A6A78CF0492E@linux.dev \
    --to=thorsten.blum@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=ardb@kernel.org \
    --cc=brauner@kernel.org \
    --cc=code@tyhicks.com \
    --cc=ebiggers@kernel.org \
    --cc=ecryptfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhalcrow@us.ibm.com \
    --cc=stable@vger.kernel.org \
    --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®