diff options
author | Al Viro <viro@ZenIV.linux.org.uk> | 2015-11-11 03:42:49 +0100 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2015-11-11 17:36:57 +0100 |
commit | cadfbb6ec2e55171479191046142c927a8b12d87 (patch) | |
tree | 3e1c3b1b4419eef0805da29da93d7448db404d94 /fs/dax.c | |
parent | block: fix blk-core.c kernel-doc warning (diff) | |
download | linux-cadfbb6ec2e55171479191046142c927a8b12d87.tar.xz linux-cadfbb6ec2e55171479191046142c927a8b12d87.zip |
dax_io(): don't let non-error value escape via retval instead of EFAULT
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Reported-by: Sasha Levin <sasha.levin@oracle.com>
Cc: stable@vger.kernel.org # 4.0+
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'fs/dax.c')
-rw-r--r-- | fs/dax.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -169,8 +169,10 @@ static ssize_t dax_io(struct inode *inode, struct iov_iter *iter, else len = iov_iter_zero(max - pos, iter); - if (!len) + if (!len) { + retval = -EFAULT; break; + } pos += len; addr += len; |