Skip to content

Commit 7b0393e

Browse files
Al Virogregkh
authored andcommitted
iov_iter_fault_in_readable() should do nothing in xarray case
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>
1 parent b6df9e4 commit 7b0393e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎lib/iov_iter.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,7 @@ int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes)
434434
int err;
435435
struct iovec v;
436436

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

0 commit comments

Comments
 (0)