]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net_sched: act_ctinfo: use atomic64_t for three counters
authorEric Dumazet <edumazet@google.com>
Wed, 9 Jul 2025 09:01:57 +0000 (09:01 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Aug 2025 10:08:47 +0000 (12:08 +0200)
commitc9eeae9639ea958fd14db33a2bcede94bf8c9248
tree1f04fe0ab17e611982e2a0292d08cb29657a943b
parent103c4e27ec9f5fe53022e46e976abf52c7221baf
net_sched: act_ctinfo: use atomic64_t for three counters

[ Upstream commit d300335b4e18672913dd792ff9f49e6cccf41d26 ]

Commit 21c167aa0ba9 ("net/sched: act_ctinfo: use percpu stats")
missed that stats_dscp_set, stats_dscp_error and stats_cpmark_set
might be written (and read) locklessly.

Use atomic64_t for these three fields, I doubt act_ctinfo is used
heavily on big SMP hosts anyway.

Fixes: 24ec483cec98 ("net: sched: Introduce act_ctinfo action")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Pedro Tammela <pctammela@mojatatu.com>
Link: https://patch.msgid.link/20250709090204.797558-6-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/net/tc_act/tc_ctinfo.h
net/sched/act_ctinfo.c