kernel-fxtec-pro1x/net/sched
Vlad Buslov 6ab9684731 net: sched: don't use tc_action->order during action dump
[ Upstream commit 4097e9d250fb17958c1d9b94538386edd3f20144 ]

Function tcf_action_dump() relies on tc_action->order field when starting
nested nla to send action data to userspace. This approach breaks in
several cases:

- When multiple filters point to same shared action, tc_action->order field
  is overwritten each time it is attached to filter. This causes filter
  dump to output action with incorrect attribute for all filters that have
  the action in different position (different order) from the last set
  tc_action->order value.

- When action data is displayed using tc action API (RTM_GETACTION), action
  order is overwritten by tca_action_gd() according to its position in
  resulting array of nl attributes, which will break filter dump for all
  filters attached to that shared action that expect it to have different
  order value.

Don't rely on tc_action->order when dumping actions. Set nla according to
action position in resulting array of actions instead.

Signed-off-by: Vlad Buslov <vladbu@mellanox.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-06-04 08:02:32 +02:00
..
act_api.c net: sched: don't use tc_action->order during action dump 2019-06-04 08:02:32 +02:00
act_bpf.c
act_connmark.c
act_csum.c
act_gact.c
act_ife.c
act_ipt.c net/sched: act_ipt: fix refcount leak when replace fails 2019-03-10 07:17:20 +01:00
act_meta_mark.c
act_meta_skbprio.c
act_meta_skbtcindex.c
act_mirred.c net: sched: fix cleanup NULL pointer exception in act_mirr 2019-04-03 06:26:19 +02:00
act_nat.c
act_pedit.c
act_police.c
act_sample.c net/sched: act_sample: fix divide by zero in the traffic path 2019-04-17 08:38:41 +02:00
act_simple.c
act_skbedit.c net/sched: act_skbedit: fix refcount leak when replace fails 2019-03-10 07:17:20 +01:00
act_skbmod.c
act_tunnel_key.c net: sched: act_tunnel_key: fix NULL pointer dereference during init 2019-03-10 07:17:20 +01:00
act_vlan.c
cls_api.c net_sched: refetch skb protocol for each filter 2019-01-31 08:14:31 +01:00
cls_basic.c
cls_bpf.c
cls_cgroup.c
cls_flow.c
cls_flower.c net: sched: flower: insert new filter to idr after setting its mask 2019-03-19 13:12:41 +01:00
cls_fw.c
cls_matchall.c net/sched: fix ->get helper of the matchall cls 2019-04-17 08:38:41 +02:00
cls_route.c
cls_rsvp.c
cls_rsvp.h
cls_rsvp6.c
cls_tcindex.c net_sched: fix two more memory leaks in cls_tcindex 2019-02-27 10:08:59 +01:00
cls_u32.c
em_canid.c
em_cmp.c
em_ipset.c
em_ipt.c
em_meta.c
em_nbyte.c
em_text.c
em_u32.c
ematch.c
Kconfig
Makefile
sch_api.c
sch_atm.c
sch_blackhole.c
sch_cake.c sch_cake: Simplify logic in cake_select_tin() 2019-04-27 09:36:32 +02:00
sch_cbq.c
sch_cbs.c
sch_choke.c
sch_codel.c
sch_drr.c
sch_dsmark.c
sch_etf.c
sch_fifo.c
sch_fq.c
sch_fq_codel.c
sch_generic.c net: sched: put back q.qlen into a single location 2019-03-10 07:17:16 +01:00
sch_gred.c
sch_hfsc.c
sch_hhf.c
sch_htb.c
sch_ingress.c
sch_mq.c
sch_mqprio.c
sch_multiq.c
sch_netem.c net: netem: fix skb length BUG_ON in __skb_to_sgvec 2019-03-10 07:17:18 +01:00
sch_pie.c
sch_plug.c
sch_prio.c
sch_qfq.c
sch_red.c
sch_sfb.c
sch_sfq.c
sch_skbprio.c
sch_tbf.c
sch_teql.c