]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tcp_metrics: annotate data-races around tm->tcpm_stamp
authorEric Dumazet <edumazet@google.com>
Wed, 2 Aug 2023 13:14:56 +0000 (13:14 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Aug 2023 13:13:54 +0000 (15:13 +0200)
commit9a7367cbe33d548ca3641a298475c7fa7909ac3b
tree23d968c3914789463a19585560efe5fc0af7c202
parent6f6bd67f4894bcda5ff96b8397b51097fe02493a
tcp_metrics: annotate data-races around tm->tcpm_stamp

[ Upstream commit 949ad62a5d5311d36fce2e14fe5fed3f936da51c ]

tm->tcpm_stamp can be read or written locklessly.

Add needed READ_ONCE()/WRITE_ONCE() to document this.

Also constify tcpm_check_stamp() dst argument.

Fixes: 51c5d0c4b169 ("tcp: Maintain dynamic metrics in local cache.")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://lore.kernel.org/r/20230802131500.1478140-3-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv4/tcp_metrics.c