|
@@ -1004,6 +1004,11 @@ dax_iomap_actor(struct inode *inode, loff_t pos, loff_t length, void *data,
|
|
if (map_len > end - pos)
|
|
if (map_len > end - pos)
|
|
map_len = end - pos;
|
|
map_len = end - pos;
|
|
|
|
|
|
|
|
+ /*
|
|
|
|
+ * The userspace address for the memory copy has already been
|
|
|
|
+ * validated via access_ok() in either vfs_read() or
|
|
|
|
+ * vfs_write(), depending on which operation we are doing.
|
|
|
|
+ */
|
|
if (iov_iter_rw(iter) == WRITE)
|
|
if (iov_iter_rw(iter) == WRITE)
|
|
map_len = dax_copy_from_iter(dax_dev, pgoff, kaddr,
|
|
map_len = dax_copy_from_iter(dax_dev, pgoff, kaddr,
|
|
map_len, iter);
|
|
map_len, iter);
|