]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - include/net/act_api.h
net: fix data-race in neigh_event_send()
[mirror_ubuntu-bionic-kernel.git] / include / net / act_api.h
index fd08df74c466dca80bdee085e3b2ed67546e8eae..33a39ba96d2568759b34c616a4b2bd9e3a0aa746 100644 (file)
@@ -14,6 +14,7 @@
 struct tcf_idrinfo {
        spinlock_t      lock;
        struct idr      action_idr;
+       struct net      *net;
 };
 
 struct tc_action_ops;
@@ -103,7 +104,7 @@ struct tc_action_net {
 };
 
 static inline
-int tc_action_net_init(struct tc_action_net *tn,
+int tc_action_net_init(struct net *net, struct tc_action_net *tn,
                       const struct tc_action_ops *ops)
 {
        int err = 0;
@@ -112,6 +113,7 @@ int tc_action_net_init(struct tc_action_net *tn,
        if (!tn->idrinfo)
                return -ENOMEM;
        tn->ops = ops;
+       tn->idrinfo->net = net;
        spin_lock_init(&tn->idrinfo->lock);
        idr_init(&tn->idrinfo->action_idr);
        return err;