linux/net/sched
John Fastabend 18cdb37ebf net: sched: do not use tcf_proto 'tp' argument from call_rcu
Using the tcf_proto pointer 'tp' from inside the classifiers callback
is not valid because it may have been cleaned up by another call_rcu
occuring on another CPU.

'tp' is currently being used by tcf_unbind_filter() in this patch we
move instances of tcf_unbind_filter outside of the call_rcu() context.
This is safe to do because any running schedulers will either read the
valid class field or it will be zeroed.

And all schedulers today when the class is 0 do a lookup using the
same call used by the tcf_exts_bind(). So even if we have a running
classifier hit the null class pointer it will do a lookup and get
to the same result. This is particularly fragile at the moment because
the only way to verify this is to audit the schedulers call sites.

Reported-by: Cong Wang <xiyou.wangconf@gmail.com>
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Acked-by: Cong Wang <cwang@twopensource.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-10-06 18:02:33 -04:00
..
Kconfig net: pkt_sched: PIE AQM scheme 2014-01-06 15:13:01 -05:00
Makefile net: pkt_sched: PIE AQM scheme 2014-01-06 15:13:01 -05:00
act_api.c net: sched: enable per cpu qstats 2014-09-30 01:02:26 -04:00
act_csum.c net_sched: act: move tcf_hashinfo_init() into tcf_register_action() 2014-02-12 19:23:32 -05:00
act_gact.c net_sched: act: move tcf_hashinfo_init() into tcf_register_action() 2014-02-12 19:23:32 -05:00
act_ipt.c net_sched: act: move tcf_hashinfo_init() into tcf_register_action() 2014-02-12 19:23:32 -05:00
act_mirred.c net_sched: hold tcf_lock in netdevice notifier 2014-07-20 20:31:42 -07:00
act_nat.c net_sched: act: move tcf_hashinfo_init() into tcf_register_action() 2014-02-12 19:23:32 -05:00
act_pedit.c net_sched: act: move tcf_hashinfo_init() into tcf_register_action() 2014-02-12 19:23:32 -05:00
act_police.c net: sched: make bstats per cpu and estimator RCU safe 2014-09-30 01:02:26 -04:00
act_simple.c net_sched: act: move tcf_hashinfo_init() into tcf_register_action() 2014-02-12 19:23:32 -05:00
act_skbedit.c net_sched: act: move tcf_hashinfo_init() into tcf_register_action() 2014-02-12 19:23:32 -05:00
cls_api.c net_sched: remove the first parameter from tcf_exts_destroy() 2014-09-28 17:29:01 -04:00
cls_basic.c net: sched: do not use tcf_proto 'tp' argument from call_rcu 2014-10-06 18:02:33 -04:00
cls_bpf.c net: sched: do not use tcf_proto 'tp' argument from call_rcu 2014-10-06 18:02:33 -04:00
cls_cgroup.c net: sched: cls_cgroup tear down exts and ematch from rcu callback 2014-10-06 18:02:32 -04:00
cls_flow.c net: sched: remove tcf_proto from ematch calls 2014-10-06 18:02:32 -04:00
cls_fw.c net: sched: do not use tcf_proto 'tp' argument from call_rcu 2014-10-06 18:02:33 -04:00
cls_route.c net: sched: do not use tcf_proto 'tp' argument from call_rcu 2014-10-06 18:02:33 -04:00
cls_rsvp.c
cls_rsvp.h net: sched: cls_rcvp, complete rcu conversion 2014-09-29 00:04:55 -04:00
cls_rsvp6.c
cls_tcindex.c net_sched: fix another crash in cls_tcindex 2014-10-01 22:00:42 -04:00
cls_u32.c net_sched: avoid calling tcf_unbind_filter() in call_rcu callback 2014-10-01 22:00:42 -04:00
em_canid.c net: sched: remove tcf_proto from ematch calls 2014-10-06 18:02:32 -04:00
em_cmp.c net_sched: cleanups 2011-01-19 23:31:12 -08:00
em_ipset.c net: sched: remove tcf_proto from ematch calls 2014-10-06 18:02:32 -04:00
em_meta.c net: sched: remove tcf_proto from ematch calls 2014-10-06 18:02:32 -04:00
em_nbyte.c net: sched: remove tcf_proto from ematch calls 2014-10-06 18:02:32 -04:00
em_text.c net: sched: remove tcf_proto from ematch calls 2014-10-06 18:02:32 -04:00
em_u32.c net_sched: cleanups 2011-01-19 23:31:12 -08:00
ematch.c net: sched: remove tcf_proto from ematch calls 2014-10-06 18:02:32 -04:00
sch_api.c net: sched: avoid costly atomic operation in fq_dequeue() 2014-10-06 00:55:10 -04:00
sch_atm.c net: sched: enable per cpu qstats 2014-09-30 01:02:26 -04:00
sch_blackhole.c
sch_cbq.c net: sched: enable per cpu qstats 2014-09-30 01:02:26 -04:00
sch_choke.c net: sched: implement qstat helper routines 2014-09-30 01:02:26 -04:00
sch_codel.c net: sched: implement qstat helper routines 2014-09-30 01:02:26 -04:00
sch_drr.c net: sched: enable per cpu qstats 2014-09-30 01:02:26 -04:00
sch_dsmark.c net: sched: implement qstat helper routines 2014-09-30 01:02:26 -04:00
sch_fifo.c net: sched: implement qstat helper routines 2014-09-30 01:02:26 -04:00
sch_fq.c net: sched: avoid costly atomic operation in fq_dequeue() 2014-10-06 00:55:10 -04:00
sch_fq_codel.c net: sched: enable per cpu qstats 2014-09-30 01:02:26 -04:00
sch_generic.c qdisc: validate skb without holding lock 2014-10-03 15:36:11 -07:00
sch_gred.c net: sched: implement qstat helper routines 2014-09-30 01:02:26 -04:00
sch_hfsc.c net: sched: enable per cpu qstats 2014-09-30 01:02:26 -04:00
sch_hhf.c net: sched: implement qstat helper routines 2014-09-30 01:02:26 -04:00
sch_htb.c net: sched: enable per cpu qstats 2014-09-30 01:02:26 -04:00
sch_ingress.c net: sched: implement qstat helper routines 2014-09-30 01:02:26 -04:00
sch_mq.c net: sched: enable per cpu qstats 2014-09-30 01:02:26 -04:00
sch_mqprio.c net: sched: enable per cpu qstats 2014-09-30 01:02:26 -04:00
sch_multiq.c net: sched: enable per cpu qstats 2014-09-30 01:02:26 -04:00
sch_netem.c net: sched: implement qstat helper routines 2014-09-30 01:02:26 -04:00
sch_pie.c net: sched: implement qstat helper routines 2014-09-30 01:02:26 -04:00
sch_plug.c net_sched: sch_plug: plug_qdisc_ops is static 2012-02-13 16:04:40 -05:00
sch_prio.c net: sched: enable per cpu qstats 2014-09-30 01:02:26 -04:00
sch_qfq.c net: sched: enable per cpu qstats 2014-09-30 01:02:26 -04:00
sch_red.c net: sched: implement qstat helper routines 2014-09-30 01:02:26 -04:00
sch_sfb.c net: sched: implement qstat helper routines 2014-09-30 01:02:26 -04:00
sch_sfq.c net: sched: enable per cpu qstats 2014-09-30 01:02:26 -04:00
sch_tbf.c net: sched: avoid costly atomic operation in fq_dequeue() 2014-10-06 00:55:10 -04:00
sch_teql.c net: qdisc: use rcu prefix and silence sparse warnings 2014-09-13 12:30:25 -04:00