From: Jarek Poplawski Date: Mon, 3 Nov 2008 10:52:50 +0000 (-0800) Subject: pkt_sched: sch_generic: Kfree gso_skb in qdisc_reset() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=67305ebc992abf2121fb2149fd8a707cd7cfcbd2;p=openwrt%2Fstaging%2Fblogic.git pkt_sched: sch_generic: Kfree gso_skb in qdisc_reset() Since gso_skb is re-used for qdisc_peek_dequeued(), and this skb is counted in the qdisc->q.qlen, it has to be kfreed during qdisc_reset() when qlen is zeroed. With help from David S. Miller Signed-off-by: Jarek Poplawski Signed-off-by: David S. Miller --- diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 318c9f656e8e..1192da229835 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c @@ -542,6 +542,9 @@ void qdisc_reset(struct Qdisc *qdisc) if (ops->reset) ops->reset(qdisc); + + kfree_skb(qdisc->gso_skb); + qdisc->gso_skb = NULL; } EXPORT_SYMBOL(qdisc_reset);