This is a note to let you know that I've just added the patch titled net_sched: sch_fq: fix incorrect behavior for small weights to the 6.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: net_sched-sch_fq-fix-incorrect-behavior-for-small-we.patch and it can be found in the queue-6.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit c08fbc679d4448404b971d7547f660cac0cdca7e Author: Eric Dumazet <edumazet@xxxxxxxxxx> Date: Sat Aug 24 18:19:01 2024 +0000 net_sched: sch_fq: fix incorrect behavior for small weights [ Upstream commit bc21000e99f92a6b5540d7267c6b22806c5c33d3 ] fq_dequeue() has a complex logic to find packets in one of the 3 bands. As Neal found out, it is possible that one band has a deficit smaller than its weight. fq_dequeue() can return NULL while some packets are elligible for immediate transmit. In this case, more than one iteration is needed to refill pband->credit. With default parameters (weights 589824 196608 65536) bug can trigger if large BIG TCP packets are sent to the lowest priority band. Bisected-by: John Sperbeck <jsperbeck@xxxxxxxxxx> Diagnosed-by: Neal Cardwell <ncardwell@xxxxxxxxxx> Fixes: 29f834aa326e ("net_sched: sch_fq: add 3 bands and WRR scheduling") Signed-off-by: Eric Dumazet <edumazet@xxxxxxxxxx> Reviewed-by: Neal Cardwell <ncardwell@xxxxxxxxxx> Link: https://patch.msgid.link/20240824181901.953776-1-edumazet@xxxxxxxxxx Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/net/sched/sch_fq.c b/net/sched/sch_fq.c index 2389747256793..19a49af5a9e52 100644 --- a/net/sched/sch_fq.c +++ b/net/sched/sch_fq.c @@ -663,7 +663,9 @@ static struct sk_buff *fq_dequeue(struct Qdisc *sch) pband = &q->band_flows[q->band_nr]; pband->credit = min(pband->credit + pband->quantum, pband->quantum); - goto begin; + if (pband->credit > 0) + goto begin; + retry = 0; } if (q->time_next_delayed_flow != ~0ULL) qdisc_watchdog_schedule_range_ns(&q->watchdog,