net: sched: fix missing free per cpu on qstats
Subsystems (3)
PATCH 1/1 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.
--- net/sched/sch_generic.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
net/sched/sch_generic.c +3 -1
@@ -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); }
Quoted 5 lines · John Fastabend
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 <[email protected]>---
David, please add the following tag to ease backports to stable kernels:
Thanks !
Quoted 4 lines · John Fastabend
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 <[email protected]>
David Miller
maintainerFrom: Eric Dumazet <[email protected]>
Date: Tue, 05 Jan 2016 09:44:11 -0800
Quoted 3 lines
David, please add the following tag to ease backports to stable kernels:
Fixes 22e0f8b9322cb ("net: sched: make bstats per cpu and estimator RCU safe")
Ok, will do, thanks!
Quoted 4 lines · Eric Dumazet
Quoted 3 lines · John Fastabend
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.
Quoted 9 lines
Quoted 2 lines
Signed-off-by John Fastabend <[email protected]>---
Acked-by Eric Dumazet <[email protected]>David, please add the following tag to ease backports to stable kernels:
Fixes 22e0f8b9322cb ("net: sched: make bstats per cpu and estimator RCU safe")
Not a big deal at all but... doesn't that fix commit b0ab6f92752b9f9d8 instead of 22e0f8b9322cb?
Quoted 10 lines · Cong Wang
Quoted 9 lines · Eric Dumazet
Quoted 5 lines · John Fastabend
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 <[email protected]>---
Acked-by Eric Dumazet <[email protected]>
Quoted 7 lines
Quoted 4 lines
David, please add the following tag to ease backports to stable kernels:
Fixes 22e0f8b9322cb ("net: sched: make bstats per cpu and estimator RCU safe")Not a big deal at all but... doesn't that fix commit
b0ab6f92752b9f9d8instead of22e0f8b9322cb?
Hmmm... you may be right. Both were added in 3.18.
My search was based on commit adding qdisc_is_percpu_stats()
David Miller
maintainerFrom: Eric Dumazet <[email protected]>
Date: Tue, 05 Jan 2016 19:07:49 -0800
Quoted 16 lines · Cong Wang
Quoted 15 lines · Eric Dumazet
Quoted 13 lines · John Fastabend
Quoted 5 lines
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 <[email protected]>---
Acked-by Eric Dumazet <[email protected]>David, please add the following tag to ease backports to stable kernels:
Fixes 22e0f8b9322cb ("net: sched: make bstats per cpu and estimator RCU safe")
Quoted 6 lines
Quoted 2 lines
Not a big deal at all but... doesn't that fix commit
b0ab6f92752b9f9d8instead of22e0f8b9322cb?Hmmm... you may be right. Both were added in 3.18.
My search was based on commit adding
qdisc_is_percpu_stats()
The right commit looks to be b0ab6f92752b9f9d8, so that's what I've used in the Fixes: tag.
Applied and queued up for -stable, thanks!