Skip to content

Commit aaf6532

Browse files
wdebruijkuba-moo
authored andcommitted
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]>
1 parent 3a03f9e commit aaf6532

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv4/tcp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1127,7 +1127,7 @@ int tcp_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t size)
11271127
/* 'common' sending to sendq */
11281128
}
11291129

1130-
sockcm_init(&sockc, sk);
1130+
sockc = (struct sockcm_cookie) { .tsflags = READ_ONCE(sk->sk_tsflags)};
11311131
if (msg->msg_controllen) {
11321132
err = sock_cmsg_send(sk, msg, &sockc);
11331133
if (unlikely(err)) {

0 commit comments

Comments
 (0)