Commit 9677ccb6 authored by Al Viro's avatar Al Viro Committed by Kamal Mostafa

dax_io(): don't let non-error value escape via retval instead of EFAULT

commit cadfbb6e upstream.
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Reported-by: default avatarSasha Levin <sasha.levin@oracle.com>
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent cfc52c6f
......@@ -162,8 +162,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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment