Commit 93f586d4 authored by Eric Dumazet's avatar Eric Dumazet Committed by Yongqiang Liu
Browse files

tcp_metrics: annotate data-races around tm->tcpm_lock

stable inclusion
from stable-v4.19.291
commit f58d2c5102736c2fe8af9515e31c733d51f0520c
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7ZELT


CVE: NA

--------------------------------

[ Upstream commit 285ce119 ]

tm->tcpm_lock can be read or written locklessly.

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

Fixes: 51c5d0c4 ("tcp: Maintain dynamic metrics in local cache.")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
Reviewed-by: default avatarKuniyuki Iwashima <kuniyu@amazon.com>
Link: https://lore.kernel.org/r/20230802131500.1478140-4-edumazet@google.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarYongqiang Liu <liuyongqiang13@huawei.com>
parent baf10b59
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment