projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a03f9e
)
tcp: only initialize sockcm tsflags field
author
Willem de Bruijn
<willemb@google.com>
Fri, 14 Feb 2025 22:26:58 +0000
(17:26 -0500)
committer
Jakub Kicinski
<kuba@kernel.org>
Wed, 19 Feb 2025 02:27:19 +0000
(18:27 -0800)
TCP only reads the tsflags field. Don't bother initializing others.
Signed-off-by: Willem de Bruijn <willemb@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link:
https://patch.msgid.link/20250214222720.3205500-2-willemdebruijn.kernel@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/tcp.c
patch
|
blob
|
blame
|
history
diff --git
a/net/ipv4/tcp.c
b/net/ipv4/tcp.c
index 5d78ab3b416e2d299252145d3881561ea7c61e15..6a8f19a10911a231414ebcbbc979c4a9fefb437a 100644
(file)
--- a/
net/ipv4/tcp.c
+++ b/
net/ipv4/tcp.c
@@
-1127,7
+1127,7
@@
int tcp_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t size)
/* 'common' sending to sendq */
}
- sockc
m_init(&sockc, sk)
;
+ sockc
= (struct sockcm_cookie) { .tsflags = READ_ONCE(sk->sk_tsflags)}
;
if (msg->msg_controllen) {
err = sock_cmsg_send(sk, msg, &sockc);
if (unlikely(err)) {