Skip to content

Commit f8ac26e

Browse files
committed
codel: remove sch->q.qlen check before qdisc_tree_reduce_backlog()
jira LE-3845 cve CVE-2025-38350 Rebuild_History Non-Buildable kernel-4.18.0-553.69.1.el8_10 commit-author Cong Wang <[email protected]> commit 342debc After making all ->qlen_notify() callbacks idempotent, now it is safe to remove the check of qlen!=0 from both fq_codel_dequeue() and codel_qdisc_dequeue(). Reported-by: Gerrard Tai <[email protected]> Fixes: 4b549a2 ("fq_codel: Fair Queue Codel AQM") Fixes: 76e3cc1 ("codel: Controlled Delay AQM") Signed-off-by: Cong Wang <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Acked-by: Jamal Hadi Salim <[email protected]> Signed-off-by: Paolo Abeni <[email protected]> (cherry picked from commit 342debc) Signed-off-by: Jonathan Maple <[email protected]>
1 parent 5c697e0 commit f8ac26e

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

net/sched/sch_codel.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,7 @@ static struct sk_buff *codel_qdisc_dequeue(struct Qdisc *sch)
9595
&q->stats, qdisc_pkt_len, codel_get_enqueue_time,
9696
drop_func, dequeue_func);
9797

98-
/* We cant call qdisc_tree_reduce_backlog() if our qlen is 0,
99-
* or HTB crashes. Defer it for next round.
100-
*/
101-
if (q->stats.drop_count && sch->q.qlen) {
98+
if (q->stats.drop_count) {
10299
qdisc_tree_reduce_backlog(sch, q->stats.drop_count, q->stats.drop_len);
103100
q->stats.drop_count = 0;
104101
q->stats.drop_len = 0;

net/sched/sch_fq_codel.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,8 @@ static struct sk_buff *fq_codel_dequeue(struct Qdisc *sch)
318318
}
319319
qdisc_bstats_update(sch, skb);
320320
flow->deficit -= qdisc_pkt_len(skb);
321-
/* We cant call qdisc_tree_reduce_backlog() if our qlen is 0,
322-
* or HTB crashes. Defer it for next round.
323-
*/
324-
if (q->cstats.drop_count && sch->q.qlen) {
321+
322+
if (q->cstats.drop_count) {
325323
qdisc_tree_reduce_backlog(sch, q->cstats.drop_count,
326324
q->cstats.drop_len);
327325
q->cstats.drop_count = 0;

0 commit comments

Comments
 (0)