netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] iov_iter: use "maxpages" parameter
@ 2022-09-08 12:20 Dan Carpenter
  2022-09-16 10:50 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2022-09-08 12:20 UTC (permalink / raw)
  To: Alexander Viro, Jakub Kicinski
  Cc: David S. Miller, linux-kernel, netdev, kernel-janitors

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(-)

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);
 
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] iov_iter: use "maxpages" parameter
  2022-09-08 12:20 [PATCH net-next] iov_iter: use "maxpages" parameter Dan Carpenter
@ 2022-09-16 10:50 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-09-16 10:50 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: viro, kuba, davem, linux-kernel, netdev, kernel-janitors

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-16 11:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-08 12:20 [PATCH net-next] iov_iter: use "maxpages" parameter Dan Carpenter
2022-09-16 10:50 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).