[to-be-updated] dax-disable-filesystem-dax-on-devices-that-do-not-map-pages.patch removed from -mm tree

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

 



The patch titled
     Subject: dax: disable filesystem dax on devices that do not map pages
has been removed from the -mm tree.  Its filename was
     dax-disable-filesystem-dax-on-devices-that-do-not-map-pages.patch

This patch was dropped because an updated version will be merged

------------------------------------------------------
From: Dan Williams <dan.j.williams@xxxxxxxxx>
Subject: dax: disable filesystem dax on devices that do not map pages

If a dax buffer from a device that does not map pages is passed to read(2)
or write(2) as a target for direct-I/O it triggers SIGBUS.  If gdb
attempts to examine the contents of a dax buffer from a device that does
not map pages it triggers SIGBUS.  If fork(2) is called on a process with
a dax mapping from a device that does not map pages it triggers SIGBUS. 
'struct page' is required otherwise several kernel code paths break in
surprising ways.  Disable filesystem-dax on devices that do not map pages.

Link: http://lkml.kernel.org/r/150664807247.36094.11168730579639072446.stgit@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx>
Cc: Jan Kara <jack@xxxxxxx>
Cc: Jeff Moyer <jmoyer@xxxxxxxxxx>
Cc: Christoph Hellwig <hch@xxxxxx>
Cc: Ross Zwisler <ross.zwisler@xxxxxxxxxxxxxxx>
Cc: "Kirill A. Shutemov" <kirill.shutemov@xxxxxxxxxxxxxxx>
Cc: Michal Hocko <mhocko@xxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 drivers/dax/super.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff -puN drivers/dax/super.c~dax-disable-filesystem-dax-on-devices-that-do-not-map-pages drivers/dax/super.c
--- a/drivers/dax/super.c~dax-disable-filesystem-dax-on-devices-that-do-not-map-pages
+++ a/drivers/dax/super.c
@@ -15,6 +15,7 @@
 #include <linux/mount.h>
 #include <linux/magic.h>
 #include <linux/genhd.h>
+#include <linux/pfn_t.h>
 #include <linux/cdev.h>
 #include <linux/hash.h>
 #include <linux/slab.h>
@@ -123,6 +124,12 @@ int __bdev_dax_supported(struct super_bl
 		return len < 0 ? len : -EIO;
 	}
 
+	if (!pfn_t_has_page(pfn)) {
+		pr_debug("VFS (%s): error: dax support not enabled\n",
+				sb->s_id);
+		return -EOPNOTSUPP;
+	}
+
 	return 0;
 }
 EXPORT_SYMBOL_GPL(__bdev_dax_supported);
_

Patches currently in -mm which might be from dan.j.williams@xxxxxxxxx are

dax-stop-using-vm_mixedmap-for-dax.patch
dax-stop-using-vm_hugepage-for-dax.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux