[4.2.y-ckt stable] Patch "net: sched: fix missing free per cpu on qstats" has been added to the 4.2.y-ckt tree

Kamal Mostafa kamal at canonical.com
Fri Jan 15 23:58:42 UTC 2016


This is a note to let you know that I have just added a patch titled

    net: sched: fix missing free per cpu on qstats

to the linux-4.2.y-queue branch of the 4.2.y-ckt extended stable tree 
which can be found at:

    http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-4.2.y-queue

This patch is scheduled to be released in version 4.2.8-ckt2.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 4.2.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

---8<------------------------------------------------------------

>From c62fcaaf9872cf95414cf5d279debfba9e51f5d6 Mon Sep 17 00:00:00 2001
From: John Fastabend <john.fastabend at gmail.com>
Date: Tue, 5 Jan 2016 09:11:36 -0800
Subject: net: sched: fix missing free per cpu on qstats

commit 73c20a8b7245273125cfe92c4b46e6fdb568a801 upstream.

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 at intel.com>
Acked-by: Eric Dumazet <edumazet at google.com>
Acked-by: Daniel Borkmann <daniel at iogearbox.net>
Signed-off-by: David S. Miller <davem at davemloft.net>
Signed-off-by: Kamal Mostafa <kamal at canonical.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 b453270..3c6f6b77 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);
 }
--
1.9.1





More information about the kernel-team mailing list