All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Wilcox, Matthew R" <matthew.r.wilcox@intel.com>
To: Jared Hulbert <jaredeh@gmail.com>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"ross.zwisler@linux.intel.com" <ross.zwisler@linux.intel.com>
Subject: RE: bug in COW no page fault?
Date: Fri, 29 Jan 2016 21:53:44 +0000	[thread overview]
Message-ID: <100D68C7BA14664A8938383216E40DE04217F70D@FMSMSX114.amr.corp.intel.com> (raw)
In-Reply-To: <56ABDBC7.5030703@gmail.com>

Because we need to hold the i_mmap_sem until the page is inserted into the page tables to avoid racing with truncate.  Therefore it is unlocked by the MM code.

Did you try this patch?  It should have BUGged immediately that you hit this case.  If not, you have insufficient CONFIG_DEBUG enabled.

________________________________________
From: Jared Hulbert [jaredeh@gmail.com]
Sent: January 29, 2016 1:38 PM
To: linux-fsdevel@vger.kernel.org; Wilcox, Matthew R; ross.zwisler@linux.intel.com
Subject: DAX: bug in COW no page fault?

Why isn't this required?

diff --git a/fs/dax.c b/fs/dax.c
index a7f77e1..30f2abe 100644
--- a/fs/dax.c
+++ b/fs/dax.c
@@ -416,6 +416,7 @@ int __dax_fault(struct vm_area_struct *vma, struct vm_fault
                                error = -EIO;
                                goto out;
                        }
+                       i_mmap_unlock_read(mapping);
                }
                return VM_FAULT_LOCKED;
        }

  reply	other threads:[~2016-01-29 21:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-29 21:38 DAX: bug in COW no page fault? Jared Hulbert
2016-01-29 21:53 ` Wilcox, Matthew R [this message]
2016-01-29 22:12   ` Jared Hulbert
2016-01-29 22:36     ` Wilcox, Matthew R
2016-01-29 23:16       ` Jared Hulbert
2016-01-30  5:47         ` Wilcox, Matthew R
2016-01-30  6:34           ` Jared Hulbert
2016-02-01 21:12           ` Ross Zwisler

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=100D68C7BA14664A8938383216E40DE04217F70D@FMSMSX114.amr.corp.intel.com \
    --to=matthew.r.wilcox@intel.com \
    --cc=jaredeh@gmail.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=ross.zwisler@linux.intel.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.