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