linux-brain/net/sched
Dust Li 3c6e959125 net: sched: fix tc -s class show no bstats on class with nolock subqueues
[ Upstream commit 14e54ab9143fa60794d13ea0a66c792a2046a8f3 ]

When a classful qdisc's child qdisc has set the flag
TCQ_F_CPUSTATS (pfifo_fast for example), the child qdisc's
cpu_bstats should be passed to gnet_stats_copy_basic(),
but many classful qdisc didn't do that. As a result,
`tc -s class show dev DEV` always return 0 for bytes and
packets in this case.

Pass the child qdisc's cpu_bstats to gnet_stats_copy_basic()
to fix this issue.

The qstats also has this problem, but it has been fixed
in 5dd431b6b9 ("net: sched: introduce and use qstats read...")
and bstats still remains buggy.

Fixes: 22e0f8b932 ("net: sched: make bstats per cpu and estimator RCU safe")
Signed-off-by: Dust Li <dust.li@linux.alibaba.com>
Signed-off-by: Tony Lu <tonylu@linux.alibaba.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-05 15:38:19 +01:00
..
act_api.c net: avoid potential infinite loop in tc_ctl_action() 2019-10-29 09:17:03 +01:00
act_bpf.c net_sched: fix a NULL pointer deref in ipt action 2019-09-10 10:32:20 +01:00
act_connmark.c net_sched: fix a NULL pointer deref in ipt action 2019-09-10 10:32:20 +01:00
act_csum.c net_sched: fix a NULL pointer deref in ipt action 2019-09-10 10:32:20 +01:00
act_gact.c net_sched: fix a NULL pointer deref in ipt action 2019-09-10 10:32:20 +01:00
act_ife.c net_sched: fix a NULL pointer deref in ipt action 2019-09-10 10:32:20 +01:00
act_ipt.c net_sched: fix a NULL pointer deref in ipt action 2019-09-10 10:32:20 +01:00
act_meta_mark.c Support to encoding decoding skb mark on IFE action 2016-03-01 17:15:23 -05:00
act_meta_skbprio.c Support to encoding decoding skb prio on IFE action 2016-03-01 17:15:23 -05:00
act_meta_skbtcindex.c net sched ife action: Introduce skb tcindex metadata encap decap 2016-09-19 21:55:28 -04:00
act_mirred.c net_sched: fix a NULL pointer deref in ipt action 2019-09-10 10:32:20 +01:00
act_nat.c net_sched: fix a NULL pointer deref in ipt action 2019-09-10 10:32:20 +01:00
act_pedit.c net/sched: act_pedit: fix WARN() in the traffic path 2019-12-01 09:13:11 +01:00
act_police.c net_sched: fix a NULL pointer deref in ipt action 2019-09-10 10:32:20 +01:00
act_sample.c net/sched: act_sample: don't push mac header on ip6gre ingress 2019-10-05 12:47:40 +02:00
act_simple.c net_sched: fix a NULL pointer deref in ipt action 2019-09-10 10:32:20 +01:00
act_skbedit.c net_sched: fix a NULL pointer deref in ipt action 2019-09-10 10:32:20 +01:00
act_skbmod.c net_sched: fix a NULL pointer deref in ipt action 2019-09-10 10:32:20 +01:00
act_tunnel_key.c net_sched: fix a NULL pointer deref in ipt action 2019-09-10 10:32:20 +01:00
act_vlan.c net_sched: fix a NULL pointer deref in ipt action 2019-09-10 10:32:20 +01:00
cls_api.c net_sched: refetch skb protocol for each filter 2019-01-31 08:13:41 +01:00
cls_basic.c cls_basic: use tcf_exts_get_net() before call_rcu() 2017-11-09 10:03:09 +09:00
cls_bpf.c cls_bpf: don't decrement net's refcount when offload fails 2017-12-17 15:07:59 +01:00
cls_cgroup.c cls_cgroup: use tcf_exts_get_net() before call_rcu() 2017-11-09 10:03:09 +09:00
cls_flow.c cls_flow: use tcf_exts_get_net() before call_rcu() 2017-11-09 10:03:09 +09:00
cls_flower.c cls_flower: Fix incorrect idr release when failing to modify rule 2018-06-11 22:49:22 +02:00
cls_fw.c cls_fw: use tcf_exts_get_net() before call_rcu() 2017-11-09 10:03:09 +09:00
cls_matchall.c net/sched: fix ->get helper of the matchall cls 2019-04-17 08:37:46 +02:00
cls_route.c cls_route: use tcf_exts_get_net() before call_rcu() 2017-11-09 10:03:10 +09:00
cls_rsvp.c
cls_rsvp.h cls_rsvp: use tcf_exts_get_net() before call_rcu() 2017-11-09 10:03:10 +09:00
cls_rsvp6.c
cls_tcindex.c net_sched: fix two more memory leaks in cls_tcindex 2019-05-16 19:42:30 +02:00
cls_u32.c net: sched: Fix memory exposure from short TCA_U32_SEL 2018-09-15 09:45:24 +02:00
em_canid.c net: sched: remove tcf_proto from ematch calls 2014-10-06 18:02:32 -04:00
em_cmp.c
em_ipset.c netfilter: x_tables: move hook state into xt_action_param structure 2016-11-03 10:56:21 +01:00
em_meta.c net: convert sock.sk_refcnt from atomic_t to refcount_t 2017-07-01 07:39:08 -07:00
em_nbyte.c net: sched: remove tcf_proto from ematch calls 2014-10-06 18:02:32 -04:00
em_text.c net: Remove state argument from skb_find_text() 2015-02-22 15:59:54 -05:00
em_u32.c
ematch.c netlink: pass extended ACK struct to parsing functions 2017-04-13 13:58:22 -04:00
Kconfig net: sched: select cls when cls_act is enabled 2017-06-05 10:56:36 -04:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sch_api.c net_sched: check cops->tcf_block in tc_bind_tclass() 2019-11-06 12:43:22 +01:00
sch_atm.c net_sched: remove tc class reference counting 2017-08-25 17:19:10 -07:00
sch_blackhole.c net_sched: blackhole: tell upper qdisc about dropped packets 2018-07-22 14:28:46 +02:00
sch_cbq.c sch_cbq: validate TCA_CBQ_WRROPT to avoid crash 2019-10-07 18:55:21 +02:00
sch_choke.c net_sched: red: Avoid illegal values 2018-02-25 11:07:59 +01:00
sch_codel.c net: sched: Fix a possible null-pointer dereference in dequeue_func() 2019-08-09 17:53:35 +02:00
sch_drr.c net_sched: remove tc class reference counting 2017-08-25 17:19:10 -07:00
sch_dsmark.c sch_dsmark: fix potential NULL deref in dsmark_init() 2019-10-07 18:55:19 +02:00
sch_fifo.c sched: don't use skb queue helpers 2016-09-19 01:47:18 -04:00
sch_fq_codel.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-09-01 17:42:05 -07:00
sch_fq.c net_sched: fq: take care of throttled flows before reuse 2018-05-19 10:20:24 +02:00
sch_generic.c net_sched: let qdisc_put() accept NULL pointer 2019-09-21 07:15:28 +02:00
sch_gred.c net: sched: gred: pass the right attribute to gred_change_table_def() 2018-11-04 14:52:48 +01:00
sch_hfsc.c net_sched/hfsc: fix curve activation in hfsc_change_class() 2017-09-21 11:56:32 -07:00
sch_hhf.c net/flow_dissector: switch to siphash 2019-11-10 11:25:37 +01:00
sch_htb.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2017-09-01 17:42:05 -07:00
sch_ingress.c net: sched: fix static key imbalance in case of ingress/clsact_init error 2018-01-02 20:31:12 +01:00
sch_mq.c net: sched: fix tc -s class show no bstats on class with nolock subqueues 2019-12-05 15:38:19 +01:00
sch_mqprio.c net: sched: fix tc -s class show no bstats on class with nolock subqueues 2019-12-05 15:38:19 +01:00
sch_multiq.c net: sched: fix tc -s class show no bstats on class with nolock subqueues 2019-12-05 15:38:19 +01:00
sch_netem.c sch_netem: fix rcu splat in netem_enqueue() 2019-11-06 12:43:39 +01:00
sch_pie.c netlink: pass extended ACK struct to parsing functions 2017-04-13 13:58:22 -04:00
sch_plug.c net_sched: drop packets after root qdisc lock is released 2016-06-25 12:19:35 -04:00
sch_prio.c net: sched: fix tc -s class show no bstats on class with nolock subqueues 2019-12-05 15:38:19 +01:00
sch_qfq.c sched: Use __qdisc_drop instead of kfree_skb in sch_prio and sch_qfq 2017-09-06 21:20:07 -07:00
sch_red.c net: sched: red: avoid hashing NULL child 2018-05-25 16:17:23 +02:00
sch_sfb.c net/flow_dissector: switch to siphash 2019-11-10 11:25:37 +01:00
sch_sfq.c net/flow_dissector: switch to siphash 2019-11-10 11:25:37 +01:00
sch_tbf.c net: create skb_gso_validate_mac_len() 2019-02-20 10:20:48 +01:00
sch_teql.c net: make ndo_get_stats64 a void function 2017-01-08 17:51:44 -05:00