summaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorJarek Poplawski <jarkao2@gmail.com>2008-11-03 02:52:50 -0800
committerDavid S. Miller <davem@davemloft.net>2008-11-03 02:52:50 -0800
commit67305ebc992abf2121fb2149fd8a707cd7cfcbd2 (patch)
tree4d6972424550db5ff5f42290f81c29a31e1fda49 /net/sched
parent5799de0b12c773874282444052da401989075df6 (diff)
downloadlinux-67305ebc992abf2121fb2149fd8a707cd7cfcbd2.tar.gz
linux-67305ebc992abf2121fb2149fd8a707cd7cfcbd2.tar.bz2
linux-67305ebc992abf2121fb2149fd8a707cd7cfcbd2.zip
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 <davem@davemloft.net> Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r--net/sched/sch_generic.c3
1 files changed, 3 insertions, 0 deletions
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);