diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2021-06-02 14:48:21 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-20 16:20:56 +0200 |
commit | c027848a98c501c781ebe3b9927eb65b1d8b467f (patch) | |
tree | fd80d224096cefc28dd036c829b8576a31463c67 /lib | |
parent | b0dfe924a0dd4241c4b3271ceb27edd34f9994c2 (diff) | |
download | linux-stable-c027848a98c501c781ebe3b9927eb65b1d8b467f.tar.gz linux-stable-c027848a98c501c781ebe3b9927eb65b1d8b467f.tar.bz2 linux-stable-c027848a98c501c781ebe3b9927eb65b1d8b467f.zip |
iov_iter_fault_in_readable() should do nothing in xarray case
commit 0e8f0d67401589a141950856902c7d0ec8d9c985 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>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/iov_iter.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/iov_iter.c b/lib/iov_iter.c index a75ea633b5c4..07d735b2eccf 100644 --- a/lib/iov_iter.c +++ b/lib/iov_iter.c @@ -394,7 +394,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)) |