From: Jan Harkes <jaharkes@cs.cmu.edu>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "Lorenzo Stoakes (ARM)" <ljs@kernel.org>,
"David Rheinsberg" <david@readahead.eu>,
"Hugh Dickins" <hughd@google.com>,
"Vlastimil Babka" <vbabka@kernel.org>,
"Liam R. Howlett" <liam@infradead.org>,
"David Hildenbrand" <david@kernel.org>,
"Jann Horn" <jannh@google.com>, "Alex Shi" <alexs@kernel.org>,
"Johannes Weiner" <hannes@cmpxchg.org>,
"Pedro Falcato" <pfalcato@suse.de>,
"David Rientjes" <rientjes@google.com>,
"Rik van Riel" <riel@redhat.com>,
"Mike Rapoport" <rppt@kernel.org>,
"Suren Baghdasaryan" <surenb@google.com>,
"Michal Hocko" <mhocko@suse.com>,
"Jonathan Corbet" <corbet@lwn.net>,
"Shuah Khan" <skhan@linuxfoundation.org>,
"Randy Dunlap" <rdunlap@infradead.org>,
"Michał Mirosław" <mirq-linux@rere.qmqm.pl>,
"Arnd Bergmann" <arnd@arndb.de>,
"Stephen Rothwell" <sfr@canb.auug.org.au>,
"Muhammad Usama Anjum" <usama.anjum@arm.com>,
linux-mm@kvack.org, "Andrei Vagin" <avagin@gmail.com>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-fsdevel@vger.kernel.org, "Chris Mason" <mason@kernel.org>,
stable@vger.kernel.org
Subject: Re: [PATCH 1/4] coda: never point a file's f_mapping at a container's mapping
Date: Sat, 28 Nov 2026 14:40:20 -0500 [thread overview]
Message-ID: <20261128194020.lc5sblsbe6pvv5mm@cs.cmu.edu> (raw)
In-Reply-To: <20261127222308.a372076fef9e470ea264cbb5@linux-foundation.org>
On Fri, Nov 27, 2026 at 10:23:08PM -0800, Andrew Morton wrote:
> On Fri, 27 Nov 2026 20:10:13 -0500 Jan Harkes <jaharkes@cs.cmu.edu> wrote:
> > > Yeah, I hit this while getting
> > > tools/testing/selftests/mm/memory-failure.c to work on all Linux
> > > filesystems.
> >
> > Did you test this without the actual Coda userspace? What was the
> > cache consistency model your userspace was using?
>
> Couldn't figure out how to get Venus working (I wouldn't know what a
> coda is if it bit me on the foot!) so a mockup thing over tmpfs was
> used in place.
>
> <tries harder>
>
> OK, reran with real Venus and a writable file on the server. The below
> repro makes a writable shared mapping, then opens and maps it again
> while the first mapping is live. All 300 first mappings succeeded and
> 299 of the 300 second mappings failed with EPERM. This uses one Coda
> file and doesn't depend on Venus changing containers between opens.
>
> That one-line-removal fixes this up.
Thank you so much for running that test. Rereading what I wrote, I'm
sorry for my tone and truly appreciate the effort you put in reproducing
the bug.
Now I am really confused as to what the use of file->f_mapping actually
is. I thought I understood how this mmap stuff worked, but clearly I do not.
> I also hit a lockdep splat along the way. That's also appended along
> with a slop-coded "fix" which I haven't even looked at, sorry. But it
> did make the splat go away.
Sweet, it may be slop coded but it looks good. It fixes both the lockdep
my moving the upcall copy_to_user outside of the locked region, but it
also corrects an obvious bug in the error handling when copy_to_user fails.
Thank you,
Jan
next prev parent reply other threads:[~2026-11-28 19:40 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 19:45 [PATCH 0/4] mm: AI-generated fixes for coda, madvise, mprotect and PAGEMAP_SCAN Lorenzo Stoakes (ARM)
2026-11-27 19:45 ` [PATCH 1/4] coda: never point a file's f_mapping at a container's mapping Lorenzo Stoakes (ARM)
2026-11-27 20:44 ` Andrew Morton
2026-11-27 22:05 ` Pedro Falcato
2026-11-28 1:10 ` Jan Harkes
2026-11-28 6:23 ` Andrew Morton
2026-11-28 19:40 ` Jan Harkes [this message]
2026-11-27 22:01 ` Pedro Falcato
2026-11-27 19:45 ` [PATCH 2/4] mm/madvise: don't declare OOM for MADV_WILLNEED swapin Lorenzo Stoakes (ARM)
2026-11-27 22:14 ` Pedro Falcato
2026-11-27 19:45 ` [PATCH 3/4] mm/mprotect: fix unpaired notifier start at address 0 Lorenzo Stoakes (ARM)
2026-11-27 22:15 ` Pedro Falcato
2026-11-27 19:45 ` [PATCH 4/4] fs/proc/task_mmu: write-protect only with ptrace attach Lorenzo Stoakes (ARM)
2026-11-27 22:24 ` Pedro Falcato
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=20261128194020.lc5sblsbe6pvv5mm@cs.cmu.edu \
--to=jaharkes@cs.cmu.edu \
--cc=akpm@linux-foundation.org \
--cc=alexs@kernel.org \
--cc=arnd@arndb.de \
--cc=avagin@gmail.com \
--cc=corbet@lwn.net \
--cc=david@kernel.org \
--cc=david@readahead.eu \
--cc=hannes@cmpxchg.org \
--cc=hughd@google.com \
--cc=jannh@google.com \
--cc=liam@infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mason@kernel.org \
--cc=mhocko@suse.com \
--cc=mirq-linux@rere.qmqm.pl \
--cc=pfalcato@suse.de \
--cc=rdunlap@infradead.org \
--cc=riel@redhat.com \
--cc=rientjes@google.com \
--cc=rppt@kernel.org \
--cc=sfr@canb.auug.org.au \
--cc=skhan@linuxfoundation.org \
--cc=stable@vger.kernel.org \
--cc=surenb@google.com \
--cc=usama.anjum@arm.com \
--cc=vbabka@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®