]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net/sched: sch_sfb: annotate data-races in sfb_dump_stats()
authorEric Dumazet <edumazet@google.com>
Tue, 21 Apr 2026 14:16:55 +0000 (14:16 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 23 Apr 2026 04:12:59 +0000 (21:12 -0700)
commit1ada03fdef82d3d7d2edb9dcd3acc91917675e48
treef35ed70d3c3f9271c6ee930906646095935ed48d
parenta8f5192809caf636d05ba47c144f282cfd0e3839
net/sched: sch_sfb: annotate data-races in sfb_dump_stats()

sfb_dump_stats() only runs with RTNL held,
reading fields that can be changed in qdisc fast path.

Add READ_ONCE()/WRITE_ONCE() annotations.

Alternative would be to acquire the qdisc spinlock, but our long-term
goal is to make qdisc dump operations lockless as much as we can.

tc_sfb_xstats fields don't need to be latched atomically,
otherwise this bug would have been caught earlier.

Fixes: edb09eb17ed8 ("net: sched: do not acquire qdisc spinlock in qdisc/class stats dump")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260421141655.3953721-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/sched/sch_sfb.c