Re: [PATCH] tcp: use WRITE_ONCE() for tsoffset in tcp_v6_connect()
From: patchwork-bot+netdevbpf
Date: Wed Mar 11 2026 - 23:30:23 EST
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@xxxxxxxxxx>:
On Mon, 9 Mar 2026 19:26:04 -0600 you wrote:
> Commit dd23c9f1e8d5 ("tcp: annotate data-races around tp->tsoffset")
> updated do_tcp_getsockopt() to read tp->tsoffset with READ_ONCE()
> for TCP_TIMESTAMP because another CPU may change it concurrently.
>
> tcp_v6_connect() still stores tp->tsoffset with a plain write. That
> store runs under lock_sock() via inet_stream_connect(), but the socket
> lock does not serialize a concurrent getsockopt(TCP_TIMESTAMP) from
> another task sharing the socket.
>
> [...]
Here is the summary with links:
- tcp: use WRITE_ONCE() for tsoffset in tcp_v6_connect()
https://git.kernel.org/netdev/net-next/c/dc9902bbd480
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html