android_kernel_oneplus_msm8998/net/sched
Jakub Kicinski 7fc851d0f8 net: sched: gred: pass the right attribute to gred_change_table_def()
[ Upstream commit 38b4f18d56372e1e21771ab7b0357b853330186c ]

gred_change_table_def() takes a pointer to TCA_GRED_DPS attribute,
and expects it will be able to interpret its contents as
struct tc_gred_sopt.  Pass the correct gred attribute, instead of
TCA_OPTIONS.

This bug meant the table definition could never be changed after
Qdisc was initialized (unless whatever TCA_OPTIONS contained both
passed netlink validation and was a valid struct tc_gred_sopt...).

Old behaviour:
$ ip link add type dummy
$ tc qdisc replace dev dummy0 parent root handle 7: \
     gred setup vqs 4 default 0
$ tc qdisc replace dev dummy0 parent root handle 7: \
     gred setup vqs 4 default 0
RTNETLINK answers: Invalid argument

Now:
$ ip link add type dummy
$ tc qdisc replace dev dummy0 parent root handle 7: \
     gred setup vqs 4 default 0
$ tc qdisc replace dev dummy0 parent root handle 7: \
     gred setup vqs 4 default 0
$ tc qdisc replace dev dummy0 parent root handle 7: \
     gred setup vqs 4 default 0

Fixes: f62d6b936d ("[PKT_SCHED]: GRED: Use central VQ change procedure")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-10 07:41:41 -08:00
..
act_api.c net sched actions: fix dumping which requires several messages to user space 2018-04-13 19:50:27 +02:00
act_bpf.c net/sched: fix NULL dereference in the error path of tcf_bpf_init() 2018-04-13 19:50:25 +02:00
act_connmark.c act_connmark: avoid crashing on malformed nlattrs with null parms 2017-03-22 12:04:16 +01:00
act_csum.c sched: act_csum: don't mangle TCP and UDP GSO packets 2018-03-22 09:23:22 +01:00
act_gact.c
act_ipt.c net: sched: fix NULL pointer dereference when action calls some targets 2017-08-30 10:19:21 +02:00
act_mirred.c net_sched: close another race condition in tcf_mirred_release() 2017-05-02 21:19:49 -07:00
act_nat.c
act_pedit.c
act_police.c
act_simple.c
act_skbedit.c
act_vlan.c
cls_api.c
cls_basic.c
cls_bpf.c
cls_cgroup.c
cls_flow.c
cls_flower.c
cls_fw.c
cls_route.c
cls_rsvp.c
cls_rsvp.h
cls_rsvp6.c
cls_tcindex.c net_sched: fix NULL pointer dereference when delete tcindex filter 2018-08-22 07:48:35 +02:00
cls_u32.c
em_canid.c
em_cmp.c
em_ipset.c
em_meta.c
em_nbyte.c
em_text.c
em_u32.c
ematch.c
Kconfig
Makefile
sch_api.c net: sched: Fix one possible panic when no destroy callback 2017-07-21 07:44:54 +02:00
sch_atm.c
sch_blackhole.c net_sched: blackhole: tell upper qdisc about dropped packets 2018-07-22 14:25:53 +02:00
sch_cbq.c
sch_choke.c net_sched: red: Avoid illegal values 2018-02-25 11:03:40 +01:00
sch_codel.c
sch_drr.c
sch_dsmark.c sch_dsmark: fix invalid skb_cow() usage 2017-12-25 14:22:10 +01:00
sch_fifo.c
sch_fq.c net_sched: fq: take care of throttled flows before reuse 2018-05-26 08:48:47 +02:00
sch_fq_codel.c
sch_generic.c
sch_gred.c net: sched: gred: pass the right attribute to gred_change_table_def() 2018-11-10 07:41:41 -08:00
sch_hfsc.c
sch_hhf.c sch_hhf: fix null pointer dereference on init failure 2018-09-15 09:40:41 +02:00
sch_htb.c sch_htb: fix crash on init failure 2018-09-15 09:40:41 +02:00
sch_ingress.c
sch_mq.c net_sched: fix error recovery at qdisc creation 2017-07-21 07:44:54 +02:00
sch_mqprio.c net_sched: fix error recovery at qdisc creation 2017-07-21 07:44:54 +02:00
sch_multiq.c sch_multiq: fix double free on init failure 2018-09-15 09:40:41 +02:00
sch_netem.c sch_netem: avoid null pointer deref on init failure 2018-09-15 09:40:42 +02:00
sch_pie.c
sch_plug.c
sch_prio.c
sch_qfq.c
sch_red.c sch_red: update backlog as well 2018-11-10 07:41:37 -08:00
sch_sfb.c
sch_sfq.c net_sched: red: Avoid illegal values 2018-02-25 11:03:40 +01:00
sch_tbf.c sch_tbf: fix two null pointer dereferences on init failure 2018-09-15 09:40:42 +02:00
sch_teql.c