archive mirror
 help / color / mirror / Atom feed
From: Greg KH <>
To: Stan Hu <>
Cc:, Miklos Szeredi <>
Subject: Re: Request for cherry-picking overlayfs fixes in 5.10.x stable
Date: Fri, 3 Dec 2021 11:31:04 +0100	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Thu, Dec 02, 2021 at 04:29:34PM -0800, Stan Hu wrote:
> A number of users have reported that under certain conditions using
> the overlay filesystem, copy_file_range() can unexpectedly create a
> 0-byte file. [0]
> This bug can cause significant problems because applications that copy
> files expect the target file to match the source immediately after the
> copy. After upgrading from Linux 5.4 to Linux 5.10, our Docker-based
> CI tests started failing due to this bug, since Ruby's IO.copy_stream
> uses this system call. We have worked around the problem by touching
> the target file before using it, but this shouldn't be necessary.
> Other projects, such as Rust, have added similar workarounds. [1]
> As discussed in the linux-fsdevel mailing list [2], the bug appears to
> be present in Linux 5.6 to 5.10, but not in Linux 5.11. We should be
> able to cherry-pick the following upstream patches to fix this. Could
> you cherry-pick them to 5.10.x stable? I've confirmed that these
> patches, applied from top to bottom to that branch, pass the
> reproduction test [3]:
> 82a763e61e2b601309d696d4fa514c77d64ee1be
> 9b91b6b019fda817eb52f728eb9c79b3579760bc
> The diffstat:
>  fs/overlayfs/file.c | 59
> +++++++++++++++++++++++++++++++----------------------------
>  1 file changed, 31 insertions(+), 28 deletions(-)
> Note that these patches do not pick cleanly into 5.6.x - 5.9.x stable.
> [0]
> [1]
> [2]
> [3]

Now queued up, thanks,

greg k-h

      reply	other threads:[~2021-12-03 10:31 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-03  0:29 Request for cherry-picking overlayfs fixes in 5.10.x stable Stan Hu
2021-12-03 10:31 ` Greg KH [this message]

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* 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;
as well as URLs for NNTP newsgroup(s).