All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Eric Biggers <ebiggers@kernel.org>
Cc: heyunlei@hihonor.com, jaegeuk@kernel.org, stable@vger.kernel.org,
	yuchao0@huawei.com
Subject: Re: FAILED: patch "[PATCH] f2fs: fix error handling in f2fs_end_enable_verity()" failed to apply to 5.4-stable tree
Date: Wed, 12 May 2021 11:22:28 +0200	[thread overview]
Message-ID: <YJueVGc6G7nOhYSi@kroah.com> (raw)
In-Reply-To: <YJltfzQoLKumJvpa@gmail.com>

On Mon, May 10, 2021 at 10:29:35AM -0700, Eric Biggers wrote:
> On Sun, May 09, 2021 at 12:09:04PM +0200, gregkh@linuxfoundation.org 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@vger.kernel.org>.
> > 
> > thanks,
> > 
> > greg k-h
> > 
> > ------------------ original commit in Linus's tree ------------------
> > 
> > >From 3c0315424f5e3d2a4113c7272367bee1e8e6a174 Mon Sep 17 00:00:00 2001
> > From: Eric Biggers <ebiggers@google.com>
> > 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@hihonor.com>
> > Fixes: 95ae251fe828 ("f2fs: add fs-verity support")
> > Cc: <stable@vger.kernel.org> # v5.4+
> > Signed-off-by: Eric Biggers <ebiggers@google.com>
> > Reviewed-by: Chao Yu <yuchao0@huawei.com>
> > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
> > 
> 
> 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

  reply	other threads:[~2021-05-12  9:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-09 10:09 FAILED: patch "[PATCH] f2fs: fix error handling in f2fs_end_enable_verity()" failed to apply to 5.4-stable tree gregkh
2021-05-10 17:29 ` Eric Biggers
2021-05-12  9:22   ` Greg KH [this message]
2021-05-12 19:46     ` Eric Biggers

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=YJueVGc6G7nOhYSi@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=ebiggers@kernel.org \
    --cc=heyunlei@hihonor.com \
    --cc=jaegeuk@kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=yuchao0@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.