All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net: sched: fix missing free per cpu on qstats
@ 2016-01-05 17:11 John Fastabend
  2016-01-05 17:44 ` Eric Dumazet
  2016-01-05 18:00 ` Daniel Borkmann
  0 siblings, 2 replies; 7+ messages in thread
From: John Fastabend @ 2016-01-05 17:11 UTC (permalink / raw)
  To: netdev; +Cc: eric.dumazet, davem, daniel

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.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
---
 net/sched/sch_generic.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c
index e82a1ad..16bc83b 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)
 {
 	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);
 }

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-01-06  6:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-05 17:11 [PATCH] net: sched: fix missing free per cpu on qstats John Fastabend
2016-01-05 17:44 ` Eric Dumazet
2016-01-05 19:14   ` David Miller
2016-01-06  2:49   ` Cong Wang
2016-01-06  3:07     ` Eric Dumazet
2016-01-06  6:41       ` David Miller
2016-01-05 18:00 ` Daniel Borkmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.