net: sched: gred: pass extack to nla_parse_nested()
authorJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 15 Nov 2018 06:23:46 +0000 (22:23 -0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 17 Nov 2018 07:08:51 +0000 (23:08 -0800)
In case netlink wants to provide parsing error pass extack
to nla_parse_nested().

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: John Hurley <john.hurley@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_gred.c

index 22110be9d285bb02937914f73d7f727fe0c4c035..9f6a4ddd262a44903b10299fe16f96aa1f271af1 100644 (file)
@@ -406,7 +406,7 @@ static int gred_change(struct Qdisc *sch, struct nlattr *opt,
        if (opt == NULL)
                return -EINVAL;
 
-       err = nla_parse_nested(tb, TCA_GRED_MAX, opt, gred_policy, NULL);
+       err = nla_parse_nested(tb, TCA_GRED_MAX, opt, gred_policy, extack);
        if (err < 0)
                return err;
 
@@ -476,7 +476,7 @@ static int gred_init(struct Qdisc *sch, struct nlattr *opt,
        if (!opt)
                return -EINVAL;
 
-       err = nla_parse_nested(tb, TCA_GRED_MAX, opt, gred_policy, NULL);
+       err = nla_parse_nested(tb, TCA_GRED_MAX, opt, gred_policy, extack);
        if (err < 0)
                return err;