Skip to content

Commit

Permalink
net_sched: always reset qdisc backlog in qdisc_reset()
Browse files Browse the repository at this point in the history
[ Upstream commit c8e1812 ]

SKB stored in qdisc->gso_skb also counted into backlog.

Some qdiscs don't reset backlog to zero in ->reset(),
for example sfq just dequeue and free all queued skb.

Signed-off-by: Konstantin Khlebnikov <[email protected]>
Fixes: 2ccccf5 ("net_sched: update hierarchical backlog too")
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
koct9i authored and gregkh committed Oct 12, 2017
1 parent 93eef21 commit 5600c75
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/sched/sch_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,7 @@ void qdisc_reset(struct Qdisc *qdisc)
qdisc->gso_skb = NULL;
}
qdisc->q.qlen = 0;
qdisc->qstats.backlog = 0;
}
EXPORT_SYMBOL(qdisc_reset);

Expand Down

0 comments on commit 5600c75

Please sign in to comment.