Re: [PATCH net-next] net: sched: fix use before alloc of per cpu stats

2018-01-15 Thread Cong Wang
On Mon, Jan 15, 2018 at 10:33 PM, Prashant Bhole wrote: > Pardon my ignorance, I think it is necessary to forward d59f5ffa59d8 to > -net. Because previously flags were set during init and checked after init > to allocate memory. static_flags makes the flags available before init, > hence we can al

Re: [PATCH net-next] net: sched: fix use before alloc of per cpu stats

2018-01-15 Thread Prashant Bhole
On 1/16/2018 2:57 PM, Cong Wang wrote: On Mon, Jan 15, 2018 at 9:47 PM, Prashant Bhole wrote: On 1/16/2018 2:08 PM, Cong Wang wrote: On Sun, Jan 14, 2018 at 9:52 PM, Prashant Bhole wrote: About bug: During init of clsact/ingress, it links qdisc's cpu_bstats,cpu_qstats with mini qdisc.

Re: [PATCH net-next] net: sched: fix use before alloc of per cpu stats

2018-01-15 Thread Cong Wang
On Mon, Jan 15, 2018 at 9:47 PM, Prashant Bhole wrote: > > > On 1/16/2018 2:08 PM, Cong Wang wrote: >> >> On Sun, Jan 14, 2018 at 9:52 PM, Prashant Bhole >> wrote: >>> >>> About bug: >>> During init of clsact/ingress, it links qdisc's cpu_bstats,cpu_qstats >>> with mini qdisc. TCQ_F_CPUSTATS is s

Re: [PATCH net-next] net: sched: fix use before alloc of per cpu stats

2018-01-15 Thread Prashant Bhole
On 1/16/2018 2:08 PM, Cong Wang wrote: On Sun, Jan 14, 2018 at 9:52 PM, Prashant Bhole wrote: About bug: During init of clsact/ingress, it links qdisc's cpu_bstats,cpu_qstats with mini qdisc. TCQ_F_CPUSTATS is set in qdisc->flags during init and this flag is checked after init to allocate mem

Re: [PATCH net-next] net: sched: fix use before alloc of per cpu stats

2018-01-15 Thread Cong Wang
On Sun, Jan 14, 2018 at 9:52 PM, Prashant Bhole wrote: > About bug: > During init of clsact/ingress, it links qdisc's cpu_bstats,cpu_qstats > with mini qdisc. TCQ_F_CPUSTATS is set in qdisc->flags during init and > this flag is checked after init to allocate memory for stats. > > Hence mini qdisc

[PATCH net-next] net: sched: fix use before alloc of per cpu stats

2018-01-14 Thread Prashant Bhole
About bug: During init of clsact/ingress, it links qdisc's cpu_bstats,cpu_qstats with mini qdisc. TCQ_F_CPUSTATS is set in qdisc->flags during init and this flag is checked after init to allocate memory for stats. Hence mini qdisc points to null per-cpu-stats. The problem isn't caught while updati