diff mbox series

[net-next] iov_iter: use "maxpages" parameter

Message ID YxneB8I8gydE+8MF@kili (mailing list archive)
State Accepted
Commit 7187440dd7c45fd8b6dd4f3ff56b03ca4aa1bbd2
Delegated to: Netdev Maintainers
Headers show
Series [net-next] iov_iter: use "maxpages" parameter | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 14717 this patch: 14717
netdev/cc_maintainers success CCed 3 of 3 maintainers
netdev/build_clang success Errors and warnings before: 3682 this patch: 3682
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 16244 this patch: 16244
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Dan Carpenter Sept. 8, 2022, 12:20 p.m. UTC
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>
---
I'm not sure which tree this should go through.  It's a cleanup and the
only caller is in networking so probably net-next is easiest.

 include/linux/uio.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org Sept. 16, 2022, 10:50 a.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Thu, 8 Sep 2022 15:20:23 +0300 you wrote:
> 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>
> ---
> I'm not sure which tree this should go through.  It's a cleanup and the
> only caller is in networking so probably net-next is easiest.
> 
> [...]

Here is the summary with links:
  - [net-next] iov_iter: use "maxpages" parameter
    https://git.kernel.org/netdev/net-next/c/7187440dd7c4

You are awesome, thank you!
diff mbox series

Patch

diff --git a/include/linux/uio.h b/include/linux/uio.h
index e26908e443d1..47aec904a3eb 100644
--- a/include/linux/uio.h
+++ b/include/linux/uio.h
@@ -302,7 +302,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);