[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160123020102.GG2948@linux.intel.com>
Date: Fri, 22 Jan 2016 21:01:02 -0500
From: Matthew Wilcox <willy@...ux.intel.com>
To: Ross Zwisler <ross.zwisler@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org, Theodore Ts'o <tytso@....edu>,
Alexander Viro <viro@...iv.linux.org.uk>,
Andreas Dilger <adilger.kernel@...ger.ca>,
Andrew Morton <akpm@...ux-foundation.org>,
Dan Williams <dan.j.williams@...el.com>,
Dave Chinner <david@...morbit.com>, Jan Kara <jack@...e.com>,
linux-ext4@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-nvdimm@...ts.01.org, xfs@....sgi.com
Subject: Re: [RFC PATCH] dax, ext2, ext4, XFS: fix data corruption race
On Fri, Jan 22, 2016 at 04:06:11PM -0700, Ross Zwisler wrote:
> +++ 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.
Powered by blists - more mailing lists