提交 cadfbb6e 编写于 作者: A Al Viro 提交者: Jens Axboe

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

Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Reported-by: NSasha Levin <sasha.levin@oracle.com>
Cc: stable@vger.kernel.org # 4.0+
Signed-off-by: NJens Axboe <axboe@fb.com>
上级 ccc2600b
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册