Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

net/sched: sch_fq_codel: remove data-races from fq_codel_dump_stats()

fq_codel_dump_stats() acquires the qdisc spinlock a bit too late.

Move this acquisition before we fill st.qdisc_stats with live data.

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

authored by

Eric Dumazet and committed by
Jakub Kicinski
bbfaa73e 5154561d

+2 -1
+2 -1
net/sched/sch_fq_codel.c
··· 585 585 }; 586 586 struct list_head *pos; 587 587 588 + sch_tree_lock(sch); 589 + 588 590 st.qdisc_stats.maxpacket = q->cstats.maxpacket; 589 591 st.qdisc_stats.drop_overlimit = q->drop_overlimit; 590 592 st.qdisc_stats.ecn_mark = q->cstats.ecn_mark; ··· 595 593 st.qdisc_stats.memory_usage = q->memory_usage; 596 594 st.qdisc_stats.drop_overmemory = q->drop_overmemory; 597 595 598 - sch_tree_lock(sch); 599 596 list_for_each(pos, &q->new_flows) 600 597 st.qdisc_stats.new_flows_len++; 601 598