aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Dumazet <[email protected]>2023-10-20 20:00:53 +0000
committerJakub Kicinski <[email protected]>2023-10-23 15:48:27 -0700
commit06e4dd18f86876bc29786d66165f781cd0265b7c (patch)
treefecb9c43394ebe36743d59d17b09f34ecae00f24
parentd6e48462e88fe7efc78b455ecde5b0ca43ec50b7 (diff)
net_sched: sch_fq: fix off-by-one error in fq_dequeue()
A last minute change went wrong. We need to look for a packet in all 3 bands, not only two. Fixes: 29f834aa326e ("net_sched: sch_fq: add 3 bands and WRR scheduling") Reported-by: kernel test robot <[email protected]> Closes: https://lore.kernel.org/oe-lkp/[email protected] Signed-off-by: Eric Dumazet <[email protected]> Cc: Soheil Hassas Yeganeh <[email protected]> Cc: Dave Taht <[email protected]> Cc: Toke Høiland-Jørgensen <[email protected]> Tested-by: Willem de Bruijn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
-rw-r--r--net/sched/sch_fq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sched/sch_fq.c b/net/sched/sch_fq.c
index 8eacdb54e72f..f6fd0de293e5 100644
--- a/net/sched/sch_fq.c
+++ b/net/sched/sch_fq.c
@@ -651,7 +651,7 @@ static struct sk_buff *fq_dequeue(struct Qdisc *sch)
begin:
head = fq_pband_head_select(pband);
if (!head) {
- while (++retry < FQ_BANDS) {
+ while (++retry <= FQ_BANDS) {
if (++q->band_nr == FQ_BANDS)
q->band_nr = 0;
pband = &q->band_flows[q->band_nr];