Skip to content

Commit

Permalink
iov_iter_fault_in_readable() should do nothing in xarray case
Browse files Browse the repository at this point in the history
commit 0e8f0d6 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: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Al Viro authored and gregkh committed Jul 14, 2021
1 parent b6df9e4 commit 7b0393e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/iov_iter.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes)
int err;
struct iovec v;

if (!(i->type & (ITER_BVEC|ITER_KVEC))) {
if (iter_is_iovec(i)) {
iterate_iovec(i, bytes, v, iov, skip, ({
err = fault_in_pages_readable(v.iov_base, v.iov_len);
if (unlikely(err))
Expand Down

0 comments on commit 7b0393e

Please sign in to comment.