[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <5DD6E30E-4974-42D9-86CF-A6A78CF0492E@linux.dev>
Date: Sun, 11 Jan 2026 13:28:17 +0100
From: Thorsten Blum <thorsten.blum@...ux.dev>
To: Al Viro <viro@...iv.linux.org.uk>
Cc: Tyler Hicks <code@...icks.com>,
Ard Biesheuvel <ardb@...nel.org>,
Zipeng Zhang <zhangzipeng0@...mail.com>,
Christian Brauner <brauner@...nel.org>,
Eric Biggers <ebiggers@...nel.org>,
Michael Halcrow <mhalcrow@...ibm.com>,
Andrew Morton <akpm@...ux-foundation.org>,
stable@...r.kernel.org,
ecryptfs@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ecryptfs: Add missing gotos in ecryptfs_read_metadata
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
Powered by blists - more mailing lists