]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/sched/cls_u32.c
net_sched: initialize net pointer inside tcf_exts_init()
[mirror_ubuntu-bionic-kernel.git] / net / sched / cls_u32.c
index 413a59a78d2ac576711af2edc50344fa58e76083..5c1b47b2498772555fef9418a5973eab340da165 100644 (file)
@@ -823,7 +823,7 @@ static void u32_replace_knode(struct tcf_proto *tp, struct tc_u_common *tp_c,
        rcu_assign_pointer(*ins, n);
 }
 
-static struct tc_u_knode *u32_init_knode(struct tcf_proto *tp,
+static struct tc_u_knode *u32_init_knode(struct net *net, struct tcf_proto *tp,
                                         struct tc_u_knode *n)
 {
        struct tc_u_hnode *ht = rtnl_dereference(n->ht_down);
@@ -869,7 +869,7 @@ static struct tc_u_knode *u32_init_knode(struct tcf_proto *tp,
        new->tp = tp;
        memcpy(&new->sel, s, sizeof(*s) + s->nkeys*sizeof(struct tc_u32_key));
 
-       if (tcf_exts_init(&new->exts, TCA_U32_ACT, TCA_U32_POLICE)) {
+       if (tcf_exts_init(&new->exts, net, TCA_U32_ACT, TCA_U32_POLICE)) {
                kfree(new);
                return NULL;
        }
@@ -917,7 +917,7 @@ static int u32_change(struct net *net, struct sk_buff *in_skb,
                    ~(TCA_CLS_FLAGS_IN_HW | TCA_CLS_FLAGS_NOT_IN_HW))
                        return -EINVAL;
 
-               new = u32_init_knode(tp, n);
+               new = u32_init_knode(net, tp, n);
                if (!new)
                        return -ENOMEM;
 
@@ -1050,7 +1050,7 @@ static int u32_change(struct net *net, struct sk_buff *in_skb,
        n->flags = flags;
        n->tp = tp;
 
-       err = tcf_exts_init(&n->exts, TCA_U32_ACT, TCA_U32_POLICE);
+       err = tcf_exts_init(&n->exts, net, TCA_U32_ACT, TCA_U32_POLICE);
        if (err < 0)
                goto errout;