Thread (9 messages) 9 messages, 4 authors, 2016-01-26

Re: [RFC PATCH] dax, ext2, ext4, XFS: fix data corruption race

From: Matthew Wilcox <hidden>
Date: 2016-01-23 02:01:05
Also in: linux-fsdevel, linux-xfs, lkml, nvdimm

On Fri, Jan 22, 2016 at 04:06:11PM -0700, Ross Zwisler wrote:
quoted hunk ↗ jump to hunk
+++ b/fs/block_dev.c
@@ -1733,13 +1733,28 @@ static const struct address_space_operations def_blk_aops = {
  */
 static int blkdev_dax_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
 {
-	return __dax_fault(vma, vmf, blkdev_get_block, NULL);
+	int ret;
+
+	ret = __dax_fault(vma, vmf, blkdev_get_block, NULL, false);
+
+	if (WARN_ON_ONCE(ret == -EAGAIN))
+		ret = VM_FAULT_SIGBUS;
+
+	return ret;
 }
Let's not mix up -E returns and VM_FAULT returns.  We already have a
perfectly good VM_FAULT return value -- VM_FAULT_RETRY.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help