Commit 67305ebc authored by Jarek Poplawski's avatar Jarek Poplawski Committed by David S. Miller

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: default avatarJarek Poplawski <jarkao2@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5799de0b
...@@ -542,6 +542,9 @@ void qdisc_reset(struct Qdisc *qdisc) ...@@ -542,6 +542,9 @@ void qdisc_reset(struct Qdisc *qdisc)
if (ops->reset) if (ops->reset)
ops->reset(qdisc); ops->reset(qdisc);
kfree_skb(qdisc->gso_skb);
qdisc->gso_skb = NULL;
} }
EXPORT_SYMBOL(qdisc_reset); EXPORT_SYMBOL(qdisc_reset);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment