summaryrefslogtreecommitdiffstats
path: root/net/tls/tls_main.c
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2023-08-08 11:09:17 -0700
committerJakub Kicinski <kuba@kernel.org>2023-08-10 11:36:57 -0700
commit6b486676b41c369fe822fe65771ffda7eeb3ea6f (patch)
treeca3d9d5a2c439c24619a3e4ecd7c89220996a960 /net/tls/tls_main.c
parent3e91b0ebd994635df2346353322ac51ce84ce6d8 (diff)
downloadlinux-stable-6b486676b41c369fe822fe65771ffda7eeb3ea6f.tar.gz
linux-stable-6b486676b41c369fe822fe65771ffda7eeb3ea6f.tar.bz2
linux-stable-6b486676b41c369fe822fe65771ffda7eeb3ea6f.zip
net: tls: set MSG_SPLICE_PAGES consistently
We used to change the flags for the last segment, because non-last segments had the MSG_SENDPAGE_NOTLAST flag set. That flag is no longer a thing so remove the setting. Since flags most likely don't have MSG_SPLICE_PAGES set this avoids passing parts of the sg as splice and parts as non-splice. Before commit under Fixes we'd have called tcp_sendpage() which would add the MSG_SPLICE_PAGES. Why this leads to trouble remains unclear but Tariq reports hitting the WARN_ON(!sendpage_ok()) due to page refcount of 0. Fixes: e117dcfd646e ("tls: Inline do_tcp_sendpages()") Reported-by: Tariq Toukan <tariqt@nvidia.com> Link: https://lore.kernel.org/all/4c49176f-147a-4283-f1b1-32aac7b4b996@gmail.com/ Tested-by: Tariq Toukan <tariqt@nvidia.com> Link: https://lore.kernel.org/r/20230808180917.1243540-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/tls/tls_main.c')
-rw-r--r--net/tls/tls_main.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/net/tls/tls_main.c b/net/tls/tls_main.c
index b6896126bb92..4a8ee2f6badb 100644
--- a/net/tls/tls_main.c
+++ b/net/tls/tls_main.c
@@ -139,9 +139,6 @@ int tls_push_sg(struct sock *sk,
ctx->splicing_pages = true;
while (1) {
- if (sg_is_last(sg))
- msg.msg_flags = flags;
-
/* is sending application-limited? */
tcp_rate_check_app_limited(sk);
p = sg_page(sg);