LKML Archive on
help / color / mirror / Atom feed
From: Linus Torvalds <>
To: Miklos Szeredi <>
Cc: Linux Kernel Mailing List <>,
	linux-fsdevel <>,
Subject: Re: [GIT PULL] overlayfs fixes for 5.14-rc6
Date: Mon, 9 Aug 2021 14:25:17 -0700	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Mon, Aug 9, 2021 at 10:00 AM Miklos Szeredi <> wrote:
>       ovl: fix mmap denywrite

Ugh. Th edances with denywrite and mapping_unmap_writable are really
really annoying.

I've pulled this, but I really get the feeling that there's duplicated
code for these things, and that all the "if error goto" cases  (some
old, some new) are really really uglky.

I get the feeling that the whole thing with deny_write_access and
mapping_map_writable could possibly be done after-the-fact somehow as
part of actually inserting the vma in the vma tree, rather than done
as the vma is prepared.

And most users of vma_set_file() probably really don't want that whole
thing at all (ie the DRM stuff that just switches out a local thing.
They also don't check for the new error cases you've added.

So I really think this is quite questionable, and those cases should
probably have been done entirely inside ovlfs rather than polluting
the cases that don't care and don't check.


  reply	other threads:[~2021-08-09 21:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-09 17:00 Miklos Szeredi
2021-08-09 21:25 ` Linus Torvalds [this message]
2021-08-09 21:26   ` Linus Torvalds
2021-08-09 22:32     ` Matthew Wilcox
2021-08-10  5:13       ` Miklos Szeredi

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 \
    --in-reply-to='' \ \ \ \ \ \
    --subject='Re: [GIT PULL] overlayfs fixes for 5.14-rc6' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).