* [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* Re: [PATCH] net: sched: fix missing free per cpu on qstats
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-05 18:00 ` Daniel Borkmann
1 sibling, 2 replies; 7+ messages in thread
From: Eric Dumazet @ 2016-01-05 17:44 UTC (permalink / raw)
To: John Fastabend; +Cc: netdev, davem, daniel
On Tue, 2016-01-05 at 09:11 -0800, John Fastabend wrote:
> 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>
> ---
Acked-by: Eric Dumazet <edumazet@google.com>
David, please add the following tag to ease backports to stable kernels:
Fixes: 22e0f8b9322cb ("net: sched: make bstats per cpu and estimator RCU safe")
Thanks !
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] net: sched: fix missing free per cpu on qstats
2016-01-05 17:44 ` Eric Dumazet
@ 2016-01-05 19:14 ` David Miller
2016-01-06 2:49 ` Cong Wang
1 sibling, 0 replies; 7+ messages in thread
From: David Miller @ 2016-01-05 19:14 UTC (permalink / raw)
To: eric.dumazet; +Cc: john.fastabend, netdev, daniel
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 05 Jan 2016 09:44:11 -0800
> 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!
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] net: sched: fix missing free per cpu on qstats
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
1 sibling, 1 reply; 7+ messages in thread
From: Cong Wang @ 2016-01-06 2:49 UTC (permalink / raw)
To: Eric Dumazet
Cc: John Fastabend, Linux Kernel Network Developers, David Miller,
Daniel Borkmann
On Tue, Jan 5, 2016 at 9:44 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> On Tue, 2016-01-05 at 09:11 -0800, John Fastabend wrote:
>> 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>
>> ---
>
> Acked-by: Eric Dumazet <edumazet@google.com>
>
> 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?
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] net: sched: fix missing free per cpu on qstats
2016-01-06 2:49 ` Cong Wang
@ 2016-01-06 3:07 ` Eric Dumazet
2016-01-06 6:41 ` David Miller
0 siblings, 1 reply; 7+ messages in thread
From: Eric Dumazet @ 2016-01-06 3:07 UTC (permalink / raw)
To: Cong Wang
Cc: John Fastabend, Linux Kernel Network Developers, David Miller,
Daniel Borkmann
On Tue, 2016-01-05 at 18:49 -0800, Cong Wang wrote:
> On Tue, Jan 5, 2016 at 9:44 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> > On Tue, 2016-01-05 at 09:11 -0800, John Fastabend wrote:
> >> 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>
> >> ---
> >
> > Acked-by: Eric Dumazet <edumazet@google.com>
> >
> > 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?
Hmmm... you may be right. Both were added in 3.18.
My search was based on commit adding qdisc_is_percpu_stats()
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] net: sched: fix missing free per cpu on qstats
2016-01-06 3:07 ` Eric Dumazet
@ 2016-01-06 6:41 ` David Miller
0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2016-01-06 6:41 UTC (permalink / raw)
To: eric.dumazet; +Cc: xiyou.wangcong, john.fastabend, netdev, daniel
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 05 Jan 2016 19:07:49 -0800
> On Tue, 2016-01-05 at 18:49 -0800, Cong Wang wrote:
>> On Tue, Jan 5, 2016 at 9:44 AM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>> > On Tue, 2016-01-05 at 09:11 -0800, John Fastabend wrote:
>> >> 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>
>> >> ---
>> >
>> > Acked-by: Eric Dumazet <edumazet@google.com>
>> >
>> > 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?
>
> 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!
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] net: sched: fix missing free per cpu on qstats
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 18:00 ` Daniel Borkmann
1 sibling, 0 replies; 7+ messages in thread
From: Daniel Borkmann @ 2016-01-05 18:00 UTC (permalink / raw)
To: John Fastabend, netdev; +Cc: eric.dumazet, davem
On 01/05/2016 06:11 PM, John Fastabend wrote:
> 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>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
^ permalink raw reply [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.