Skip to contentSkip to conversation

net: tls, update curr on splice as well

PATCH In review John Fastabend 2 participants 2 messages Jan 9, 2024 – Jan 11, 2024

Subsystems (3)
lore
Share & tools
lore

John Fastabend

author maintainer
#0 lore raw

PATCH 1/1 net: tls, update curr on splice as well

commit c5a595000e2677e865a39f249c056bc05d6e55fd upstream.

Backport of upstream fix for tls on 5.x kernels.

The curr pointer must also be updated on the splice similar to how we do this for other copy types.

Cc [email protected] # 5.15.x
Cc [email protected] # 5.10.x
Fixes d829e9c4112b ("tls: convert to generic sk_msg interface")
---
 net/tls/tls_sw.c | 2 ++
 1 file changed, 2 insertions(+)
net/tls/tls_sw.c +2 -0
index 101d231c1b61..9ff3e4df2d6c 100644
@@ -1216,6 +1216,8 @@ static int tls_sw_do_sendpage(struct sock *sk, struct page *page,
 		}
 
 		sk_msg_page_add(msg_pl, page, copy, offset);
+		msg_pl->sg.copybreak = 0;
+		msg_pl->sg.curr = msg_pl->sg.end;
 		sk_mem_charge(sk, copy);
 
 		offset += copy;
Signature · 1 line
2.33.0
maintainer
#1 lore raw
Quoted 13 lines · John Fastabend

commit c5a595000e2677e865a39f249c056bc05d6e55fd upstream.

Backport of upstream fix for tls on 5.x kernels.

The curr pointer must also be updated on the splice similar to how we do this for other copy types.

Cc [email protected] # 5.15.x
Cc [email protected] # 5.10.x
Fixes d829e9c4112b ("tls: convert to generic sk_msg interface")
Quoted 3 lines
---
 net/tls/tls_sw.c | 2 ++
 1 file changed, 2 insertions(+)

Now queued up, thanks.

greg k-h