Skip to content

Commit

Permalink
[NET_SCHED]: sch_cbq: fix watchdog scheduled too late
Browse files Browse the repository at this point in the history
q->now is increased during dequeue and doesn't contain the current time
afterwards, resulting in a too large timeout value for the qdisc watchdog.
Use "now" instead, which still contains the current time.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Apr 26, 2007
1 parent 4361cb1 commit bb239ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/sched/sch_cbq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ cbq_dequeue(struct Qdisc *sch)
sch->qstats.overlimits++;
if (q->wd_expires)
qdisc_watchdog_schedule(&q->watchdog,
q->now + q->wd_expires);
now + q->wd_expires);
}
return NULL;
}
Expand Down

0 comments on commit bb239ac

Please sign in to comment.