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

[ Upstream commit 285ce119a3c6c4502585936650143e54c8692788 ]

tm->tcpm_lock can be read or written locklessly.

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

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-4-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/ipv4/tcp_metrics.c