diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2022-09-08 15:20:23 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-09-16 12:56:08 +0300 |
commit | 7187440dd7c45fd8b6dd4f3ff56b03ca4aa1bbd2 (patch) | |
tree | 5ac4c67741788663cfaee7c45a169241451dc5a0 /include | |
parent | 3b63ef7baa26da9f7421af2689bd849f74cac373 (diff) | |
download | linux-7187440dd7c45fd8b6dd4f3ff56b03ca4aa1bbd2.tar.xz |
iov_iter: use "maxpages" parameter
This was intended to be "maxpages" instead of INT_MAX. There is only
one caller and it passes INT_MAX so this does not affect runtime.
Fixes: b93235e68921 ("tls: cap the output scatter list to something reasonable")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/uio.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/uio.h b/include/linux/uio.h index 5896af36199c..2e3134b14ffd 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h @@ -298,7 +298,7 @@ iov_iter_npages_cap(struct iov_iter *i, int maxpages, size_t max_bytes) shorted = iov_iter_count(i) - max_bytes; iov_iter_truncate(i, max_bytes); } - npages = iov_iter_npages(i, INT_MAX); + npages = iov_iter_npages(i, maxpages); if (shorted) iov_iter_reexpand(i, iov_iter_count(i) + shorted); |