diff options
author | John Fastabend <john.fastabend@gmail.com> | 2016-01-05 09:11:36 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-01-31 11:23:36 -0800 |
commit | 02a1fef61d06bb0417b60f1233320e141266860c (patch) | |
tree | 658dfd461216c28251edabaafa5cbb97a46d6ec9 /net/sched | |
parent | 5596242a6263ece70ee14f3b6861f02b8dc82d11 (diff) |
net: sched: fix missing free per cpu on qstats
[ Upstream commit 73c20a8b7245273125cfe92c4b46e6fdb568a801 ]
When a qdisc is using per cpu stats (currently just the ingress
qdisc) only the bstats are being freed. This also free's the qstats.
Fixes: b0ab6f92752b9f9d8 ("net: sched: enable per cpu qstats")
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/sch_generic.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index b453270be3fd..3c6f6b774ba6 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c @@ -666,8 +666,10 @@ static void qdisc_rcu_free(struct rcu_head *head) { struct Qdisc *qdisc = container_of(head, struct Qdisc, rcu_head); - if (qdisc_is_percpu_stats(qdisc)) + if (qdisc_is_percpu_stats(qdisc)) { free_percpu(qdisc->cpu_bstats); + free_percpu(qdisc->cpu_qstats); + } kfree((char *) qdisc - qdisc->padded); } |