From 28c62af4185e9ac888e853cec1d2bf920135a21f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Sun, 6 Oct 2019 11:09:24 +0200 Subject: [PATCH] fix up queue-4.19/sch_cbq-validate-tca_cbq_wrropt-to-avoid-crash.patch --- ...lidate-tca_cbq_wrropt-to-avoid-crash.patch | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/queue-4.19/sch_cbq-validate-tca_cbq_wrropt-to-avoid-crash.patch b/queue-4.19/sch_cbq-validate-tca_cbq_wrropt-to-avoid-crash.patch index 72eb9055cb7..e7187b9a5f1 100644 --- a/queue-4.19/sch_cbq-validate-tca_cbq_wrropt-to-avoid-crash.patch +++ b/queue-4.19/sch_cbq-validate-tca_cbq_wrropt-to-avoid-crash.patch @@ -57,14 +57,12 @@ Reported-by: syzbot Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- - net/sched/sch_cbq.c | 43 +++++++++++++++++++++++++++++-------------- - 1 file changed, 29 insertions(+), 14 deletions(-) + net/sched/sch_cbq.c | 40 ++++++++++++++++++++++++++++------------ + 1 file changed, 28 insertions(+), 12 deletions(-) -diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c -index 06c7a2da21bc..39b427dc7512 100644 --- a/net/sched/sch_cbq.c +++ b/net/sched/sch_cbq.c -@@ -1127,6 +1127,33 @@ static const struct nla_policy cbq_policy[TCA_CBQ_MAX + 1] = { +@@ -1132,6 +1132,32 @@ static const struct nla_policy cbq_polic [TCA_CBQ_POLICE] = { .len = sizeof(struct tc_cbq_police) }, }; @@ -79,8 +77,7 @@ index 06c7a2da21bc..39b427dc7512 100644 + return -EINVAL; + } + -+ err = nla_parse_nested_deprecated(tb, TCA_CBQ_MAX, opt, -+ cbq_policy, extack); ++ err = nla_parse_nested(tb, TCA_CBQ_MAX, opt, cbq_policy, extack); + if (err < 0) + return err; + @@ -98,7 +95,7 @@ index 06c7a2da21bc..39b427dc7512 100644 static int cbq_init(struct Qdisc *sch, struct nlattr *opt, struct netlink_ext_ack *extack) { -@@ -1139,13 +1166,7 @@ static int cbq_init(struct Qdisc *sch, struct nlattr *opt, +@@ -1144,12 +1170,7 @@ static int cbq_init(struct Qdisc *sch, s hrtimer_init(&q->delay_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED); q->delay_timer.function = cbq_undelay; @@ -107,13 +104,12 @@ index 06c7a2da21bc..39b427dc7512 100644 - return -EINVAL; - } - -- err = nla_parse_nested_deprecated(tb, TCA_CBQ_MAX, opt, cbq_policy, -- extack); +- err = nla_parse_nested(tb, TCA_CBQ_MAX, opt, cbq_policy, extack); + err = cbq_opt_parse(tb, opt, extack); if (err < 0) return err; -@@ -1464,13 +1485,7 @@ cbq_change_class(struct Qdisc *sch, u32 classid, u32 parentid, struct nlattr **t +@@ -1466,12 +1487,7 @@ cbq_change_class(struct Qdisc *sch, u32 struct cbq_class *parent; struct qdisc_rate_table *rtab = NULL; @@ -122,12 +118,8 @@ index 06c7a2da21bc..39b427dc7512 100644 - return -EINVAL; - } - -- err = nla_parse_nested_deprecated(tb, TCA_CBQ_MAX, opt, cbq_policy, -- extack); +- err = nla_parse_nested(tb, TCA_CBQ_MAX, opt, cbq_policy, extack); + err = cbq_opt_parse(tb, opt, extack); if (err < 0) return err; --- -2.20.1 - -- 2.47.3