Skip to content

Commit 06e4dd1

Browse files
edumazetkuba-moo
authored andcommitted
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: 29f834a ("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]>
1 parent d6e4846 commit 06e4dd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/sched/sch_fq.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ static struct sk_buff *fq_dequeue(struct Qdisc *sch)
651651
begin:
652652
head = fq_pband_head_select(pband);
653653
if (!head) {
654-
while (++retry < FQ_BANDS) {
654+
while (++retry <= FQ_BANDS) {
655655
if (++q->band_nr == FQ_BANDS)
656656
q->band_nr = 0;
657657
pband = &q->band_flows[q->band_nr];

0 commit comments

Comments
 (0)