RE: bug in COW no page fault?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx]
Sent: January 29, 2016 1:38 PM
To: linux-fsdevel@xxxxxxxxxxxxxxx; Wilcox, Matthew R; ross.zwisler@xxxxxxxxxxxxxxx
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;
        }
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux