struct iovec contains a user pointer, so use the correct copy routine.
Signed-off-by: Tudor Cretu tudor.cretu@arm.com --- lib/iov_iter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/iov_iter.c b/lib/iov_iter.c index f8b88e515a03f..2d74d8d00ad94 100644 --- a/lib/iov_iter.c +++ b/lib/iov_iter.c @@ -1829,7 +1829,7 @@ static int copy_iovec_from_user(struct iovec *iov, { unsigned long seg;
- if (copy_from_user(iov, uvec, nr_segs * sizeof(*uvec))) + if (copy_from_user_with_ptr(iov, uvec, nr_segs * sizeof(*uvec))) return -EFAULT; for (seg = 0; seg < nr_segs; seg++) { if ((ssize_t)iov[seg].iov_len < 0)