aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/tcp.c
diff options
context:
space:
mode:
authorWillem de Bruijn <[email protected]>2025-02-14 22:26:58 +0000
committerJakub Kicinski <[email protected]>2025-02-19 02:27:19 +0000
commitaaf6532d119d8ad4c75420b021d2649864133583 (patch)
treeae76a5cc57c187d9289f4022bb869e3f383368ec /net/ipv4/tcp.c
parentnet: stmmac: Use str_enabled_disabled() helper (diff)
downloadkernel-aaf6532d119d8ad4c75420b021d2649864133583.tar.gz
kernel-aaf6532d119d8ad4c75420b021d2649864133583.zip
tcp: only initialize sockcm tsflags field
TCP only reads the tsflags field. Don't bother initializing others. Signed-off-by: Willem de Bruijn <[email protected]> Reviewed-by: David Ahern <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r--net/ipv4/tcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 5d78ab3b416e..6a8f19a10911 100644
--- 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 */
}
- sockcm_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)) {