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)
committerJakub Kicinski <kuba@kernel.org>
Thu, 3 Aug 2023 17:58:24 +0000 (10:58 -0700)
commit949ad62a5d5311d36fce2e14fe5fed3f936da51c
tree71cb8f38213263d98ebb17c7223629aca55a0b1f
parente6638094d7af6c7b9dcca05ad009e79e31b4f670
tcp_metrics: annotate data-races around tm->tcpm_stamp

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>
net/ipv4/tcp_metrics.c