Re: FAILED: patch "[PATCH] f2fs: fix error handling in f2fs_end_enable_verity()" failed to apply to 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 10, 2021 at 10:29:35AM -0700, Eric Biggers wrote:
> On Sun, May 09, 2021 at 12:09:04PM +0200, gregkh@xxxxxxxxxxxxxxxxxxx wrote:
> > 
> > The patch below does not apply to the 5.4-stable tree.
> > If someone wants it applied there, or to any other stable or longterm
> > tree, then please email the backport, including the original git commit
> > id to <stable@xxxxxxxxxxxxxxx>.
> > 
> > thanks,
> > 
> > greg k-h
> > 
> > ------------------ original commit in Linus's tree ------------------
> > 
> > >From 3c0315424f5e3d2a4113c7272367bee1e8e6a174 Mon Sep 17 00:00:00 2001
> > From: Eric Biggers <ebiggers@xxxxxxxxxx>
> > Date: Thu, 4 Mar 2021 21:43:10 -0800
> > Subject: [PATCH] f2fs: fix error handling in f2fs_end_enable_verity()
> > 
> > f2fs didn't properly clean up if verity failed to be enabled on a file:
> > 
> > - It left verity metadata (pages past EOF) in the page cache, which
> >   would be exposed to userspace if the file was later extended.
> > 
> > - It didn't truncate the verity metadata at all (either from cache or
> >   from disk) if an error occurred while setting the verity bit.
> > 
> > Fix these bugs by adding a call to truncate_inode_pages() and ensuring
> > that we truncate the verity metadata (both from cache and from disk) in
> > all error paths.  Also rework the code to cleanly separate the success
> > path from the error paths, which makes it much easier to understand.
> > 
> > Finally, log a message if f2fs_truncate() fails, since it might
> > otherwise fail silently.
> > 
> > Reported-by: Yunlei He <heyunlei@xxxxxxxxxxx>
> > Fixes: 95ae251fe828 ("f2fs: add fs-verity support")
> > Cc: <stable@xxxxxxxxxxxxxxx> # v5.4+
> > Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>
> > Reviewed-by: Chao Yu <yuchao0@xxxxxxxxxx>
> > Signed-off-by: Jaegeuk Kim <jaegeuk@xxxxxxxxxx>
> > 
> 
> This is a clean cherry-pick, and it compiles.  So I don't see what the problem
> is.

Does not apply for me at all:

Applying patch f2fs-fix-error-handling-in-f2fs_end_enable_verity.patch
patching file fs/f2fs/verity.c
Hunk #1 FAILED at 152.
1 out of 1 hunk FAILED -- rejects in file fs/f2fs/verity.c
Patch f2fs-fix-error-handling-in-f2fs_end_enable_verity.patch does not apply (enforce with -f)

Can you provide a backport?

thanks,

greg k-h



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux