From: John Fastabend <john.fastabend@gmail.com>
To: netdev@vger.kernel.org
Cc: eric.dumazet@gmail.com, davem@davemloft.net, daniel@iogearbox.net
Subject: [PATCH] net: sched: fix missing free per cpu on qstats
Date: Tue, 05 Jan 2016 09:11:36 -0800 [thread overview]
Message-ID: <20160105171136.9063.98710.stgit@john-Precision-Tower-5810> (raw)
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);
}
next reply other threads:[~2016-01-05 17:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-05 17:11 John Fastabend [this message]
2016-01-05 17:44 ` [PATCH] net: sched: fix missing free per cpu on qstats 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160105171136.9063.98710.stgit@john-Precision-Tower-5810 \
--to=john.fastabend@gmail.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox