From: Dan Williams <dan.j.williams@intel.com>
To: "Theodore Ts'o" <tytso@mit.edu>
Cc: Jan Kara <jack@suse.cz>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>,
linux-ext4 <linux-ext4@vger.kernel.org>,
Ross Zwisler <ross.zwisler@linux.intel.com>,
Linux MM <linux-mm@kvack.org>, Dave Jiang <dave.jiang@intel.com>
Subject: Re: [PATCH] mm: Fix warning in insert_pfn()
Date: Wed, 3 Oct 2018 09:56:09 -0700 [thread overview]
Message-ID: <CAPcyv4hxxcC6dkeN80MXaHx9A-kw1fn=Yjqi5uGRdFueVRFXbg@mail.gmail.com> (raw)
In-Reply-To: <20181003163557.GA18434@thunk.org>
On Wed, Oct 3, 2018 at 9:40 AM Theodore Y. Ts'o <tytso@mit.edu> wrote:
>
> On Fri, Aug 24, 2018 at 05:45:42PM +0200, Jan Kara wrote:
> > In DAX mode a write pagefault can race with write(2) in the following
> > way:
> >
> > CPU0 CPU1
> > write fault for mapped zero page (hole)
> > dax_iomap_rw()
> > iomap_apply()
> > xfs_file_iomap_begin()
> > - allocates blocks
> > dax_iomap_actor()
> > invalidate_inode_pages2_range()
> > - invalidates radix tree entries in given range
> > dax_iomap_pte_fault()
> > grab_mapping_entry()
> > - no entry found, creates empty
> > ...
> > xfs_file_iomap_begin()
> > - finds already allocated block
> > ...
> > vmf_insert_mixed_mkwrite()
> > - WARNs and does nothing because there
> > is still zero page mapped in PTE
> > unmap_mapping_pages()
> >
> > This race results in WARN_ON from insert_pfn() and is occasionally
> > triggered by fstest generic/344. Note that the race is otherwise
> > harmless as before write(2) on CPU0 is finished, we will invalidate page
> > tables properly and thus user of mmap will see modified data from
> > write(2) from that point on. So just restrict the warning only to the
> > case when the PFN in PTE is not zero page.
> >
> > Signed-off-by: Jan Kara <jack@suse.cz>
>
> I don't see this in linux-next. What's the status of this patch?
>
It's in Andrew's tree. I believe we are awaiting the next -next
release to rebase on latest mmotm.
next prev parent reply other threads:[~2018-10-03 16:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-24 15:45 [PATCH] mm: Fix warning in insert_pfn() Jan Kara
2018-10-03 16:35 ` Theodore Y. Ts'o
2018-10-03 16:56 ` Dan Williams [this message]
2018-10-04 14:35 ` Theodore Y. Ts'o
2018-10-11 0:30 ` Andrew Morton
2018-10-11 0:46 ` Dan Williams
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='CAPcyv4hxxcC6dkeN80MXaHx9A-kw1fn=Yjqi5uGRdFueVRFXbg@mail.gmail.com' \
--to=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ross.zwisler@linux.intel.com \
--cc=tytso@mit.edu \
/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;
as well as URLs for NNTP newsgroup(s).