提交 98b42868 编写于 作者: A Al Viro 提交者: Zheng Zengkai

iov_iter_fault_in_readable() should do nothing in xarray case

stable inclusion
from stable-5.10.50
commit 7b0393e6f6c86d5f1b01befebd2bf445d0f4ff94
bugzilla: 174522 https://gitee.com/openeuler/kernel/issues/I4DNFY

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7b0393e6f6c86d5f1b01befebd2bf445d0f4ff94

--------------------------------

commit 0e8f0d67 upstream.

... and actually should just check it's given an iovec-backed iterator
in the first place.

Cc: stable@vger.kernel.org
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: NWeilong Chen <chenweilong@huawei.com>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 0044d1fa
...@@ -434,7 +434,7 @@ int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes) ...@@ -434,7 +434,7 @@ int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes)
int err; int err;
struct iovec v; struct iovec v;
if (!(i->type & (ITER_BVEC|ITER_KVEC))) { if (iter_is_iovec(i)) {
iterate_iovec(i, bytes, v, iov, skip, ({ iterate_iovec(i, bytes, v, iov, skip, ({
err = fault_in_pages_readable(v.iov_base, v.iov_len); err = fault_in_pages_readable(v.iov_base, v.iov_len);
if (unlikely(err)) if (unlikely(err))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册