mirror of
https://github.com/rd-stuffs/msm-4.14.git
synced 2025-02-20 11:45:48 +08:00
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>
This commit is contained in:
parent
1c8520e466
commit
1ff545051f
@ -417,7 +417,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))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user