diff options
author | John Fastabend <john.fastabend@gmail.com> | 2016-01-05 12:11:36 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-01-06 01:40:21 -0500 |
commit | 73c20a8b7245273125cfe92c4b46e6fdb568a801 (patch) | |
tree | 694941b47f2c286d3de81d8ac056aacb22d234a6 | |
parent | f941461c925832fbeb7876b794ab9fbec6a7a8af (diff) |
net: sched: fix missing free per cpu on qstats
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>
-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 e82a1ad80aa5..16bc83b2842a 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c | |||
@@ -658,8 +658,10 @@ static void qdisc_rcu_free(struct rcu_head *head) | |||
658 | { | 658 | { |
659 | struct Qdisc *qdisc = container_of(head, struct Qdisc, rcu_head); | 659 | struct Qdisc *qdisc = container_of(head, struct Qdisc, rcu_head); |
660 | 660 | ||
661 | if (qdisc_is_percpu_stats(qdisc)) | 661 | if (qdisc_is_percpu_stats(qdisc)) { |
662 | free_percpu(qdisc->cpu_bstats); | 662 | free_percpu(qdisc->cpu_bstats); |
663 | free_percpu(qdisc->cpu_qstats); | ||
664 | } | ||
663 | 665 | ||
664 | kfree((char *) qdisc - qdisc->padded); | 666 | kfree((char *) qdisc - qdisc->padded); |
665 | } | 667 | } |