aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/act_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/act_api.c')
-rw-r--r--net/sched/act_api.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/net/sched/act_api.c b/net/sched/act_api.c
index 65d240cbf74b..8579c4bb20c9 100644
--- a/net/sched/act_api.c
+++ b/net/sched/act_api.c
@@ -485,8 +485,9 @@ errout:
485 return err; 485 return err;
486} 486}
487 487
488struct tc_action *tcf_action_init_1(struct nlattr *nla, struct nlattr *est, 488struct tc_action *tcf_action_init_1(struct net *net, struct nlattr *nla,
489 char *name, int ovr, int bind) 489 struct nlattr *est, char *name, int ovr,
490 int bind)
490{ 491{
491 struct tc_action *a; 492 struct tc_action *a;
492 struct tc_action_ops *a_o; 493 struct tc_action_ops *a_o;
@@ -542,9 +543,9 @@ struct tc_action *tcf_action_init_1(struct nlattr *nla, struct nlattr *est,
542 543
543 /* backward compatibility for policer */ 544 /* backward compatibility for policer */
544 if (name == NULL) 545 if (name == NULL)
545 err = a_o->init(tb[TCA_ACT_OPTIONS], est, a, ovr, bind); 546 err = a_o->init(net, tb[TCA_ACT_OPTIONS], est, a, ovr, bind);
546 else 547 else
547 err = a_o->init(nla, est, a, ovr, bind); 548 err = a_o->init(net, nla, est, a, ovr, bind);
548 if (err < 0) 549 if (err < 0)
549 goto err_free; 550 goto err_free;
550 551
@@ -566,8 +567,9 @@ err_out:
566 return ERR_PTR(err); 567 return ERR_PTR(err);
567} 568}
568 569
569struct tc_action *tcf_action_init(struct nlattr *nla, struct nlattr *est, 570struct tc_action *tcf_action_init(struct net *net, struct nlattr *nla,
570 char *name, int ovr, int bind) 571 struct nlattr *est, char *name, int ovr,
572 int bind)
571{ 573{
572 struct nlattr *tb[TCA_ACT_MAX_PRIO + 1]; 574 struct nlattr *tb[TCA_ACT_MAX_PRIO + 1];
573 struct tc_action *head = NULL, *act, *act_prev = NULL; 575 struct tc_action *head = NULL, *act, *act_prev = NULL;
@@ -579,7 +581,7 @@ struct tc_action *tcf_action_init(struct nlattr *nla, struct nlattr *est,
579 return ERR_PTR(err); 581 return ERR_PTR(err);
580 582
581 for (i = 1; i <= TCA_ACT_MAX_PRIO && tb[i]; i++) { 583 for (i = 1; i <= TCA_ACT_MAX_PRIO && tb[i]; i++) {
582 act = tcf_action_init_1(tb[i], est, name, ovr, bind); 584 act = tcf_action_init_1(net, tb[i], est, name, ovr, bind);
583 if (IS_ERR(act)) 585 if (IS_ERR(act))
584 goto err; 586 goto err;
585 act->order = i; 587 act->order = i;
@@ -960,7 +962,7 @@ tcf_action_add(struct net *net, struct nlattr *nla, struct nlmsghdr *n,
960 struct tc_action *a; 962 struct tc_action *a;
961 u32 seq = n->nlmsg_seq; 963 u32 seq = n->nlmsg_seq;
962 964
963 act = tcf_action_init(nla, NULL, NULL, ovr, 0); 965 act = tcf_action_init(net, nla, NULL, NULL, ovr, 0);
964 if (act == NULL) 966 if (act == NULL)
965 goto done; 967 goto done;
966 if (IS_ERR(act)) { 968 if (IS_ERR(act)) {