Merge branch 'pernet-all-async'

Kirill Tkhai says:

====================
Make pernet_operations always read locked

All the pernet_operations are converted, and the last one
is in this patchset (nfsd_net_ops acked by J. Bruce Fields).
So, it's the time to kill pernet_operations::async field,
and make setup_net() and cleanup_net() always require
the rwsem only read locked.

All further pernet_operations have to be developed to fit
this rule. Some of previous patches added a comment to
struct pernet_operations about that.

Also, this patchset renames net_sem to pernet_ops_rwsem
to make the target area of the rwsem is more clear visible,
and adds more comments.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller 2018-03-27 13:18:10 -04:00
commit c709002c23
182 changed files with 38 additions and 266 deletions

View File

@ -4554,7 +4554,6 @@ static struct pernet_operations cma_pernet_operations = {
.exit = cma_exit_net,
.id = &cma_pernet_id,
.size = sizeof(struct cma_pernet),
.async = true,
};
static int __init cma_init(void)

View File

@ -4791,7 +4791,6 @@ static struct pernet_operations bond_net_ops = {
.exit = bond_net_exit,
.id = &bond_net_id,
.size = sizeof(struct bond_net),
.async = true,
};
static int __init bonding_init(void)

View File

@ -1694,7 +1694,6 @@ static struct pernet_operations geneve_net_ops = {
.exit_batch = geneve_exit_batch_net,
.id = &geneve_net_id,
.size = sizeof(struct geneve_net),
.async = true,
};
static int __init geneve_init_module(void)

View File

@ -1325,7 +1325,6 @@ static struct pernet_operations gtp_net_ops = {
.exit = gtp_net_exit,
.id = &gtp_net_id,
.size = sizeof(struct gtp_net),
.async = true,
};
static int __init gtp_init(void)

View File

@ -1040,7 +1040,6 @@ static struct pernet_operations ipvlan_net_ops = {
.id = &ipvlan_netid,
.size = sizeof(struct ipvlan_netns),
.exit = ipvlan_ns_exit,
.async = true,
};
static int __init ipvlan_init_module(void)

View File

@ -230,5 +230,4 @@ static __net_init int loopback_net_init(struct net *net)
/* Registered in net/core/dev.c */
struct pernet_operations __net_initdata loopback_net_ops = {
.init = loopback_net_init,
.async = true,
};

View File

@ -970,7 +970,6 @@ static struct pernet_operations ppp_net_ops = {
.exit = ppp_exit_net,
.id = &ppp_net_id,
.size = sizeof(struct ppp_net),
.async = true,
};
static int ppp_unit_register(struct ppp *ppp, int unit, bool ifname_is_set)

View File

@ -1161,7 +1161,6 @@ static struct pernet_operations pppoe_net_ops = {
.exit = pppoe_exit_net,
.id = &pppoe_net_id,
.size = sizeof(struct pppoe_net),
.async = true,
};
static int __init pppoe_init(void)

View File

@ -1435,7 +1435,6 @@ static struct pernet_operations vrf_net_ops __net_initdata = {
.init = vrf_netns_init,
.id = &vrf_net_id,
.size = sizeof(bool),
.async = true,
};
static int __init vrf_init_module(void)

View File

@ -3752,7 +3752,6 @@ static struct pernet_operations vxlan_net_ops = {
.exit_batch = vxlan_exit_batch_net,
.id = &vxlan_net_id,
.size = sizeof(struct vxlan_net),
.async = true,
};
static int __init vxlan_init_module(void)

View File

@ -3542,7 +3542,6 @@ static struct pernet_operations hwsim_net_ops = {
.exit = hwsim_exit_net,
.id = &hwsim_net_id,
.size = sizeof(struct hwsim_net),
.async = true,
};
static void hwsim_exit_netlink(void)

View File

@ -709,7 +709,6 @@ static struct pernet_operations lockd_net_ops = {
.exit = lockd_exit_net,
.id = &lockd_net_id,
.size = sizeof(struct lockd_net),
.async = true,
};

View File

@ -261,7 +261,6 @@ static void nfs4blocklayout_net_exit(struct net *net)
static struct pernet_operations nfs4blocklayout_net_ops = {
.init = nfs4blocklayout_net_init,
.exit = nfs4blocklayout_net_exit,
.async = true,
};
int __init bl_init_pipefs(void)

View File

@ -410,7 +410,6 @@ static void nfs4_dns_net_exit(struct net *net)
static struct pernet_operations nfs4_dns_resolver_ops = {
.init = nfs4_dns_net_init,
.exit = nfs4_dns_net_exit,
.async = true,
};
static int rpc_pipefs_event(struct notifier_block *nb, unsigned long event,

View File

@ -2122,7 +2122,6 @@ static struct pernet_operations nfs_net_ops = {
.exit = nfs_net_exit,
.id = &nfs_net_id,
.size = sizeof(struct nfs_net),
.async = true,
};
/*

View File

@ -118,7 +118,6 @@ static struct pernet_operations grace_net_ops = {
.exit = grace_exit_net,
.id = &grace_net_id,
.size = sizeof(struct list_head),
.async = true,
};
static int __init

View File

@ -237,7 +237,6 @@ static __net_exit void proc_net_ns_exit(struct net *net)
static struct pernet_operations __net_initdata proc_net_ns_ops = {
.init = proc_net_ns_init,
.exit = proc_net_ns_exit,
.async = true,
};
int __init proc_net_init(void)

View File

@ -36,7 +36,7 @@ extern int rtnl_is_locked(void);
extern int rtnl_lock_killable(void);
extern wait_queue_head_t netdev_unregistering_wq;
extern struct rw_semaphore net_sem;
extern struct rw_semaphore pernet_ops_rwsem;
#ifdef CONFIG_PROVE_LOCKING
extern bool lockdep_rtnl_is_held(void);

View File

@ -60,9 +60,10 @@ struct net {
struct list_head list; /* list of network namespaces */
struct list_head exit_list; /* To linked to call pernet exit
* methods on dead net (net_sem
* read locked), or to unregister
* pernet ops (net_sem wr locked).
* methods on dead net (
* pernet_ops_rwsem read locked),
* or to unregister pernet ops
* (pernet_ops_rwsem write locked).
*/
struct llist_node cleanup_list; /* namespaces on death row */
@ -95,8 +96,9 @@ struct net {
/* core fib_rules */
struct list_head rules_ops;
struct list_head fib_notifier_ops; /* protected by net_sem */
struct list_head fib_notifier_ops; /* Populated by
* register_pernet_subsys()
*/
struct net_device *loopback_dev; /* The loopback */
struct netns_core core;
struct netns_mib mib;
@ -321,6 +323,10 @@ struct pernet_operations {
* have to keep in mind all other pernet_operations and
* to introduce a locking, if they share common resources.
*
* The only time they are called with exclusive lock is
* from register_pernet_subsys(), unregister_pernet_subsys()
* register_pernet_device() and unregister_pernet_device().
*
* Exit methods using blocking RCU primitives, such as
* synchronize_rcu(), should be implemented via exit_batch.
* Then, destruction of a group of net requires single
@ -333,12 +339,6 @@ struct pernet_operations {
void (*exit_batch)(struct list_head *net_exit_list);
unsigned int *id;
size_t size;
/*
* Indicates above methods are allowed to be executed in parallel
* with methods of any other pernet_operations, i.e. they are not
* need write locked net_sem.
*/
bool async;
};
/*

View File

@ -1526,7 +1526,6 @@ static struct pernet_operations audit_net_ops __net_initdata = {
.exit = audit_net_exit,
.id = &audit_net_id,
.size = sizeof(struct audit_net),
.async = true,
};
/* Initialize audit support at boot time. */

View File

@ -724,7 +724,6 @@ static void uevent_net_exit(struct net *net)
static struct pernet_operations uevent_net_ops = {
.init = uevent_net_init,
.exit = uevent_net_exit,
.async = true,
};
static int __init kobject_uevent_init(void)

View File

@ -729,7 +729,6 @@ static struct pernet_operations vlan_net_ops = {
.exit = vlan_exit_net,
.id = &vlan_net_id,
.size = sizeof(struct vlan_net),
.async = true,
};
static int __init vlan_proto_init(void)

View File

@ -188,7 +188,6 @@ static void __net_exit br_net_exit(struct net *net)
static struct pernet_operations br_net_ops = {
.exit = br_net_exit,
.async = true,
};
static const struct stp_proto br_stp_proto = {

View File

@ -969,7 +969,6 @@ static struct pernet_operations brnf_net_ops __read_mostly = {
.exit = brnf_exit_net,
.id = &brnf_net_id,
.size = sizeof(struct brnf_net),
.async = true,
};
static struct notifier_block brnf_notifier __read_mostly = {

View File

@ -77,7 +77,6 @@ static void __net_exit broute_net_exit(struct net *net)
static struct pernet_operations broute_net_ops = {
.init = broute_net_init,
.exit = broute_net_exit,
.async = true,
};
static int __init ebtable_broute_init(void)

View File

@ -105,7 +105,6 @@ static void __net_exit frame_filter_net_exit(struct net *net)
static struct pernet_operations frame_filter_net_ops = {
.init = frame_filter_net_init,
.exit = frame_filter_net_exit,
.async = true,
};
static int __init ebtable_filter_init(void)

View File

@ -105,7 +105,6 @@ static void __net_exit frame_nat_net_exit(struct net *net)
static struct pernet_operations frame_nat_net_ops = {
.init = frame_nat_net_init,
.exit = frame_nat_net_exit,
.async = true,
};
static int __init ebtable_nat_init(void)

View File

@ -48,7 +48,6 @@ static void __net_exit nf_log_bridge_net_exit(struct net *net)
static struct pernet_operations nf_log_bridge_net_ops = {
.init = nf_log_bridge_net_init,
.exit = nf_log_bridge_net_exit,
.async = true,
};
static int __init nf_log_bridge_init(void)

View File

@ -544,7 +544,6 @@ static struct pernet_operations caif_net_ops = {
.exit = caif_exit_net,
.id = &caif_net_id,
.size = sizeof(struct caif_net),
.async = true,
};
/* Initialize Caif devices list */

View File

@ -954,7 +954,6 @@ static struct notifier_block can_netdev_notifier __read_mostly = {
static struct pernet_operations can_pernet_ops __read_mostly = {
.init = can_pernet_init,
.exit = can_pernet_exit,
.async = true,
};
static __init int can_init(void)

View File

@ -1717,7 +1717,6 @@ static void canbcm_pernet_exit(struct net *net)
static struct pernet_operations canbcm_pernet_ops __read_mostly = {
.init = canbcm_pernet_init,
.exit = canbcm_pernet_exit,
.async = true,
};
static int __init bcm_module_init(void)

View File

@ -1010,7 +1010,6 @@ static void __net_exit cangw_pernet_exit(struct net *net)
static struct pernet_operations cangw_pernet_ops = {
.init = cangw_pernet_init,
.exit = cangw_pernet_exit,
.async = true,
};
static __init int cgw_module_init(void)

View File

@ -8883,7 +8883,6 @@ static void __net_exit netdev_exit(struct net *net)
static struct pernet_operations __net_initdata netdev_net_ops = {
.init = netdev_init,
.exit = netdev_exit,
.async = true,
};
static void __net_exit default_device_exit(struct net *net)
@ -8984,7 +8983,6 @@ static void __net_exit default_device_exit_batch(struct list_head *net_list)
static struct pernet_operations __net_initdata default_device_ops = {
.exit = default_device_exit,
.exit_batch = default_device_exit_batch,
.async = true,
};
/*

View File

@ -171,7 +171,6 @@ static void __net_exit fib_notifier_net_exit(struct net *net)
static struct pernet_operations fib_notifier_net_ops = {
.init = fib_notifier_net_init,
.exit = fib_notifier_net_exit,
.async = true,
};
static int __init fib_notifier_init(void)

View File

@ -1130,7 +1130,6 @@ static void __net_exit fib_rules_net_exit(struct net *net)
static struct pernet_operations fib_rules_net_ops = {
.init = fib_rules_net_init,
.exit = fib_rules_net_exit,
.async = true,
};
static int __init fib_rules_init(void)

View File

@ -349,7 +349,6 @@ static void __net_exit dev_proc_net_exit(struct net *net)
static struct pernet_operations __net_initdata dev_proc_ops = {
.init = dev_proc_net_init,
.exit = dev_proc_net_exit,
.async = true,
};
static int dev_mc_seq_show(struct seq_file *seq, void *v)
@ -406,7 +405,6 @@ static void __net_exit dev_mc_net_exit(struct net *net)
static struct pernet_operations __net_initdata dev_mc_net_ops = {
.init = dev_mc_net_init,
.exit = dev_mc_net_exit,
.async = true,
};
int __init dev_proc_init(void)

View File

@ -40,12 +40,13 @@ struct net init_net = {
EXPORT_SYMBOL(init_net);
static bool init_net_initialized;
static unsigned nr_sync_pernet_ops;
/*
* net_sem: protects: pernet_list, net_generic_ids, nr_sync_pernet_ops,
* pernet_ops_rwsem: protects: pernet_list, net_generic_ids,
* init_net_initialized and first_device pointer.
* This is internal net namespace object. Please, don't use it
* outside.
*/
DECLARE_RWSEM(net_sem);
DECLARE_RWSEM(pernet_ops_rwsem);
#define MIN_PERNET_OPS_ID \
((sizeof(struct net_generic) + sizeof(void *) - 1) / sizeof(void *))
@ -73,7 +74,7 @@ static int net_assign_generic(struct net *net, unsigned int id, void *data)
BUG_ON(id < MIN_PERNET_OPS_ID);
old_ng = rcu_dereference_protected(net->gen,
lockdep_is_held(&net_sem));
lockdep_is_held(&pernet_ops_rwsem));
if (old_ng->s.len > id) {
old_ng->ptr[id] = data;
return 0;
@ -290,7 +291,7 @@ struct net *get_net_ns_by_id(struct net *net, int id)
*/
static __net_init int setup_net(struct net *net, struct user_namespace *user_ns)
{
/* Must be called with net_sem held */
/* Must be called with pernet_ops_rwsem held */
const struct pernet_operations *ops, *saved_ops;
int error = 0;
LIST_HEAD(net_exit_list);
@ -339,7 +340,6 @@ static int __net_init net_defaults_init_net(struct net *net)
static struct pernet_operations net_defaults_ops = {
.init = net_defaults_init_net,
.async = true,
};
static __init int net_defaults_init(void)
@ -406,7 +406,6 @@ struct net *copy_net_ns(unsigned long flags,
{
struct ucounts *ucounts;
struct net *net;
unsigned write;
int rv;
if (!(flags & CLONE_NEWNET))
@ -424,25 +423,14 @@ struct net *copy_net_ns(unsigned long flags,
refcount_set(&net->passive, 1);
net->ucounts = ucounts;
get_user_ns(user_ns);
again:
write = READ_ONCE(nr_sync_pernet_ops);
if (write)
rv = down_write_killable(&net_sem);
else
rv = down_read_killable(&net_sem);
rv = down_read_killable(&pernet_ops_rwsem);
if (rv < 0)
goto put_userns;
if (!write && unlikely(READ_ONCE(nr_sync_pernet_ops))) {
up_read(&net_sem);
goto again;
}
rv = setup_net(net, user_ns);
if (write)
up_write(&net_sem);
else
up_read(&net_sem);
up_read(&pernet_ops_rwsem);
if (rv < 0) {
put_userns:
@ -490,21 +478,11 @@ static void cleanup_net(struct work_struct *work)
struct net *net, *tmp, *last;
struct llist_node *net_kill_list;
LIST_HEAD(net_exit_list);
unsigned write;
/* Atomically snapshot the list of namespaces to cleanup */
net_kill_list = llist_del_all(&cleanup_list);
again:
write = READ_ONCE(nr_sync_pernet_ops);
if (write)
down_write(&net_sem);
else
down_read(&net_sem);
if (!write && unlikely(READ_ONCE(nr_sync_pernet_ops))) {
up_read(&net_sem);
goto again;
}
down_read(&pernet_ops_rwsem);
/* Don't let anyone else find us. */
rtnl_lock();
@ -543,10 +521,7 @@ static void cleanup_net(struct work_struct *work)
list_for_each_entry_reverse(ops, &pernet_list, list)
ops_free_list(ops, &net_exit_list);
if (write)
up_write(&net_sem);
else
up_read(&net_sem);
up_read(&pernet_ops_rwsem);
/* Ensure there are no outstanding rcu callbacks using this
* network namespace.
@ -573,8 +548,8 @@ static void cleanup_net(struct work_struct *work)
*/
void net_ns_barrier(void)
{
down_write(&net_sem);
up_write(&net_sem);
down_write(&pernet_ops_rwsem);
up_write(&pernet_ops_rwsem);
}
EXPORT_SYMBOL(net_ns_barrier);
@ -654,7 +629,6 @@ static __net_exit void net_ns_net_exit(struct net *net)
static struct pernet_operations __net_initdata net_ns_ops = {
.init = net_ns_net_init,
.exit = net_ns_net_exit,
.async = true,
};
static const struct nla_policy rtnl_net_policy[NETNSA_MAX + 1] = {
@ -897,12 +871,12 @@ static int __init net_ns_init(void)
rcu_assign_pointer(init_net.gen, ng);
down_write(&net_sem);
down_write(&pernet_ops_rwsem);
if (setup_net(&init_net, &init_user_ns))
panic("Could not setup the initial network namespace");
init_net_initialized = true;
up_write(&net_sem);
up_write(&pernet_ops_rwsem);
register_pernet_subsys(&net_ns_ops);
@ -1006,9 +980,6 @@ static int register_pernet_operations(struct list_head *list,
rcu_barrier();
if (ops->id)
ida_remove(&net_generic_ids, *ops->id);
} else if (!ops->async) {
pr_info_once("Pernet operations %ps are sync.\n", ops);
nr_sync_pernet_ops++;
}
return error;
@ -1016,8 +987,6 @@ static int register_pernet_operations(struct list_head *list,
static void unregister_pernet_operations(struct pernet_operations *ops)
{
if (!ops->async)
BUG_ON(nr_sync_pernet_ops-- == 0);
__unregister_pernet_operations(ops);
rcu_barrier();
if (ops->id)
@ -1046,9 +1015,9 @@ static void unregister_pernet_operations(struct pernet_operations *ops)
int register_pernet_subsys(struct pernet_operations *ops)
{
int error;
down_write(&net_sem);
down_write(&pernet_ops_rwsem);
error = register_pernet_operations(first_device, ops);
up_write(&net_sem);
up_write(&pernet_ops_rwsem);
return error;
}
EXPORT_SYMBOL_GPL(register_pernet_subsys);
@ -1064,9 +1033,9 @@ EXPORT_SYMBOL_GPL(register_pernet_subsys);
*/
void unregister_pernet_subsys(struct pernet_operations *ops)
{
down_write(&net_sem);
down_write(&pernet_ops_rwsem);
unregister_pernet_operations(ops);
up_write(&net_sem);
up_write(&pernet_ops_rwsem);
}
EXPORT_SYMBOL_GPL(unregister_pernet_subsys);
@ -1092,11 +1061,11 @@ EXPORT_SYMBOL_GPL(unregister_pernet_subsys);
int register_pernet_device(struct pernet_operations *ops)
{
int error;
down_write(&net_sem);
down_write(&pernet_ops_rwsem);
error = register_pernet_operations(&pernet_list, ops);
if (!error && (first_device == &pernet_list))
first_device = &ops->list;
up_write(&net_sem);
up_write(&pernet_ops_rwsem);
return error;
}
EXPORT_SYMBOL_GPL(register_pernet_device);
@ -1112,11 +1081,11 @@ EXPORT_SYMBOL_GPL(register_pernet_device);
*/
void unregister_pernet_device(struct pernet_operations *ops)
{
down_write(&net_sem);
down_write(&pernet_ops_rwsem);
if (&ops->list == first_device)
first_device = first_device->next;
unregister_pernet_operations(ops);
up_write(&net_sem);
up_write(&pernet_ops_rwsem);
}
EXPORT_SYMBOL_GPL(unregister_pernet_device);

View File

@ -3852,7 +3852,6 @@ static struct pernet_operations pg_net_ops = {
.exit = pg_net_exit,
.id = &pg_net_id,
.size = sizeof(struct pktgen_net),
.async = true,
};
static int __init pg_init(void)

View File

@ -459,12 +459,12 @@ static void rtnl_lock_unregistering_all(void)
*/
void rtnl_link_unregister(struct rtnl_link_ops *ops)
{
/* Close the race with cleanup_net() */
down_write(&net_sem);
/* Close the race with setup_net() and cleanup_net() */
down_write(&pernet_ops_rwsem);
rtnl_lock_unregistering_all();
__rtnl_link_unregister(ops);
rtnl_unlock();
up_write(&net_sem);
up_write(&pernet_ops_rwsem);
}
EXPORT_SYMBOL_GPL(rtnl_link_unregister);
@ -4730,7 +4730,6 @@ static void __net_exit rtnetlink_net_exit(struct net *net)
static struct pernet_operations rtnetlink_net_ops = {
.init = rtnetlink_net_init,
.exit = rtnetlink_net_exit,
.async = true,
};
void __init rtnetlink_init(void)

View File

@ -3175,7 +3175,6 @@ static void __net_exit sock_inuse_exit_net(struct net *net)
static struct pernet_operations net_inuse_ops = {
.init = sock_inuse_init_net,
.exit = sock_inuse_exit_net,
.async = true,
};
static __init int net_inuse_init(void)
@ -3470,7 +3469,6 @@ static __net_exit void proto_exit_net(struct net *net)
static __net_initdata struct pernet_operations proto_net_ops = {
.init = proto_init_net,
.exit = proto_exit_net,
.async = true,
};
static int __init proto_init(void)

View File

@ -324,7 +324,6 @@ static void __net_exit diag_net_exit(struct net *net)
static struct pernet_operations diag_net_ops = {
.init = diag_net_init,
.exit = diag_net_exit,
.async = true,
};
static int __init sock_diag_init(void)

View File

@ -584,7 +584,6 @@ static __net_exit void sysctl_core_net_exit(struct net *net)
static __net_initdata struct pernet_operations sysctl_core_ops = {
.init = sysctl_core_net_init,
.exit = sysctl_core_net_exit,
.async = true,
};
static __init int sysctl_core_init(void)

View File

@ -1031,7 +1031,6 @@ static struct pernet_operations dccp_v4_ops = {
.init = dccp_v4_init_net,
.exit = dccp_v4_exit_net,
.exit_batch = dccp_v4_exit_batch,
.async = true,
};
static int __init dccp_v4_init(void)

View File

@ -1116,7 +1116,6 @@ static struct pernet_operations dccp_v6_ops = {
.init = dccp_v6_init_net,
.exit = dccp_v6_exit_net,
.exit_batch = dccp_v6_exit_batch,
.async = true,
};
static int __init dccp_v6_init(void)

View File

@ -603,7 +603,6 @@ static void __net_exit lowpan_frags_exit_net(struct net *net)
static struct pernet_operations lowpan_frags_ops = {
.init = lowpan_frags_init_net,
.exit = lowpan_frags_exit_net,
.async = true,
};
int __init lowpan_net_frag_init(void)

View File

@ -345,7 +345,6 @@ static void __net_exit cfg802154_pernet_exit(struct net *net)
static struct pernet_operations cfg802154_pernet_ops = {
.exit = cfg802154_pernet_exit,
.async = true,
};
static int __init wpan_phy_class_init(void)

View File

@ -1735,7 +1735,6 @@ static __net_exit void ipv4_mib_exit_net(struct net *net)
static __net_initdata struct pernet_operations ipv4_mib_ops = {
.init = ipv4_mib_init_net,
.exit = ipv4_mib_exit_net,
.async = true,
};
static int __init init_ipv4_mibs(void)
@ -1789,7 +1788,6 @@ static __net_exit void inet_exit_net(struct net *net)
static __net_initdata struct pernet_operations af_inet_ops = {
.init = inet_init_net,
.exit = inet_exit_net,
.async = true,
};
static int __init init_inet_pernet_ops(void)

View File

@ -1447,7 +1447,6 @@ static void __net_exit arp_net_exit(struct net *net)
static struct pernet_operations arp_net_ops = {
.init = arp_net_init,
.exit = arp_net_exit,
.async = true,
};
static int __init arp_proc_init(void)

View File

@ -2469,7 +2469,6 @@ static __net_exit void devinet_exit_net(struct net *net)
static __net_initdata struct pernet_operations devinet_ops = {
.init = devinet_init_net,
.exit = devinet_exit_net,
.async = true,
};
static struct rtnl_af_ops inet_af_ops __read_mostly = {

View File

@ -1362,7 +1362,6 @@ static void __net_exit fib_net_exit(struct net *net)
static struct pernet_operations fib_net_ops = {
.init = fib_net_init,
.exit = fib_net_exit,
.async = true,
};
void __init ip_fib_init(void)

View File

@ -1081,7 +1081,6 @@ static struct pernet_operations fou_net_ops = {
.exit = fou_exit_net,
.id = &fou_net_id,
.size = sizeof(struct fou_net),
.async = true,
};
static int __init fou_init(void)

View File

@ -1257,7 +1257,6 @@ static int __net_init icmp_sk_init(struct net *net)
static struct pernet_operations __net_initdata icmp_sk_ops = {
.init = icmp_sk_init,
.exit = icmp_sk_exit,
.async = true,
};
int __init icmp_init(void)

View File

@ -3028,7 +3028,6 @@ static void __net_exit igmp_net_exit(struct net *net)
static struct pernet_operations igmp_net_ops = {
.init = igmp_net_init,
.exit = igmp_net_exit,
.async = true,
};
#endif

View File

@ -885,7 +885,6 @@ static void __net_exit ipv4_frags_exit_net(struct net *net)
static struct pernet_operations ip4_frags_ops = {
.init = ipv4_frags_init_net,
.exit = ipv4_frags_exit_net,
.async = true,
};
void __init ipfrag_init(void)

View File

@ -1044,7 +1044,6 @@ static struct pernet_operations ipgre_net_ops = {
.exit_batch = ipgre_exit_batch_net,
.id = &ipgre_net_id,
.size = sizeof(struct ip_tunnel_net),
.async = true,
};
static int ipgre_tunnel_validate(struct nlattr *tb[], struct nlattr *data[],
@ -1628,7 +1627,6 @@ static struct pernet_operations ipgre_tap_net_ops = {
.exit_batch = ipgre_tap_exit_batch_net,
.id = &gre_tap_net_id,
.size = sizeof(struct ip_tunnel_net),
.async = true,
};
static int __net_init erspan_init_net(struct net *net)
@ -1647,7 +1645,6 @@ static struct pernet_operations erspan_net_ops = {
.exit_batch = erspan_exit_batch_net,
.id = &erspan_net_id,
.size = sizeof(struct ip_tunnel_net),
.async = true,
};
static int __init ipgre_init(void)

View File

@ -454,7 +454,6 @@ static struct pernet_operations vti_net_ops = {
.exit_batch = vti_exit_batch_net,
.id = &vti_net_id,
.size = sizeof(struct ip_tunnel_net),
.async = true,
};
static int vti_tunnel_validate(struct nlattr *tb[], struct nlattr *data[],

View File

@ -669,7 +669,6 @@ static struct pernet_operations ipip_net_ops = {
.exit_batch = ipip_exit_batch_net,
.id = &ipip_net_id,
.size = sizeof(struct ip_tunnel_net),
.async = true,
};
static int __init ipip_init(void)

View File

@ -3009,7 +3009,6 @@ static void __net_exit ipmr_net_exit(struct net *net)
static struct pernet_operations ipmr_net_ops = {
.init = ipmr_net_init,
.exit = ipmr_net_exit,
.async = true,
};
int __init ip_mr_init(void)

View File

@ -1635,7 +1635,6 @@ static void __net_exit arp_tables_net_exit(struct net *net)
static struct pernet_operations arp_tables_net_ops = {
.init = arp_tables_net_init,
.exit = arp_tables_net_exit,
.async = true,
};
static int __init arp_tables_init(void)

View File

@ -65,7 +65,6 @@ static void __net_exit arptable_filter_net_exit(struct net *net)
static struct pernet_operations arptable_filter_net_ops = {
.exit = arptable_filter_net_exit,
.async = true,
};
static int __init arptable_filter_init(void)

View File

@ -1916,7 +1916,6 @@ static void __net_exit ip_tables_net_exit(struct net *net)
static struct pernet_operations ip_tables_net_ops = {
.init = ip_tables_net_init,
.exit = ip_tables_net_exit,
.async = true,
};
static int __init ip_tables_init(void)

View File

@ -845,7 +845,6 @@ static struct pernet_operations clusterip_net_ops = {
.exit = clusterip_net_exit,
.id = &clusterip_net_id,
.size = sizeof(struct clusterip_net),
.async = true,
};
static int __init clusterip_tg_init(void)

View File

@ -87,7 +87,6 @@ static void __net_exit iptable_filter_net_exit(struct net *net)
static struct pernet_operations iptable_filter_net_ops = {
.init = iptable_filter_net_init,
.exit = iptable_filter_net_exit,
.async = true,
};
static int __init iptable_filter_init(void)

View File

@ -113,7 +113,6 @@ static void __net_exit iptable_mangle_net_exit(struct net *net)
static struct pernet_operations iptable_mangle_net_ops = {
.exit = iptable_mangle_net_exit,
.async = true,
};
static int __init iptable_mangle_init(void)

View File

@ -129,7 +129,6 @@ static void __net_exit iptable_nat_net_exit(struct net *net)
static struct pernet_operations iptable_nat_net_ops = {
.exit = iptable_nat_net_exit,
.async = true,
};
static int __init iptable_nat_init(void)

View File

@ -76,7 +76,6 @@ static void __net_exit iptable_raw_net_exit(struct net *net)
static struct pernet_operations iptable_raw_net_ops = {
.exit = iptable_raw_net_exit,
.async = true,
};
static int __init iptable_raw_init(void)

View File

@ -76,7 +76,6 @@ static void __net_exit iptable_security_net_exit(struct net *net)
static struct pernet_operations iptable_security_net_ops = {
.exit = iptable_security_net_exit,
.async = true,
};
static int __init iptable_security_init(void)

View File

@ -399,7 +399,6 @@ static struct pernet_operations ipv4_net_ops = {
.exit = ipv4_net_exit,
.id = &conntrack4_net_id,
.size = sizeof(struct conntrack4_net),
.async = true,
};
static int __init nf_conntrack_l3proto_ipv4_init(void)

View File

@ -118,7 +118,6 @@ static void __net_exit defrag4_net_exit(struct net *net)
static struct pernet_operations defrag4_net_ops = {
.exit = defrag4_net_exit,
.async = true,
};
static int __init nf_defrag_init(void)

View File

@ -122,7 +122,6 @@ static void __net_exit nf_log_arp_net_exit(struct net *net)
static struct pernet_operations nf_log_arp_net_ops = {
.init = nf_log_arp_net_init,
.exit = nf_log_arp_net_exit,
.async = true,
};
static int __init nf_log_arp_init(void)

View File

@ -358,7 +358,6 @@ static void __net_exit nf_log_ipv4_net_exit(struct net *net)
static struct pernet_operations nf_log_ipv4_net_ops = {
.init = nf_log_ipv4_net_init,
.exit = nf_log_ipv4_net_exit,
.async = true,
};
static int __init nf_log_ipv4_init(void)

View File

@ -1204,7 +1204,6 @@ static void __net_exit ping_v4_proc_exit_net(struct net *net)
static struct pernet_operations ping_v4_net_ops = {
.init = ping_v4_proc_init_net,
.exit = ping_v4_proc_exit_net,
.async = true,
};
int __init ping_proc_init(void)

View File

@ -549,7 +549,6 @@ static __net_exit void ip_proc_exit_net(struct net *net)
static __net_initdata struct pernet_operations ip_proc_ops = {
.init = ip_proc_init_net,
.exit = ip_proc_exit_net,
.async = true,
};
int __init ip_misc_proc_init(void)

View File

@ -1154,7 +1154,6 @@ static __net_exit void raw_exit_net(struct net *net)
static __net_initdata struct pernet_operations raw_net_ops = {
.init = raw_init_net,
.exit = raw_exit_net,
.async = true,
};
int __init raw_proc_init(void)

View File

@ -418,7 +418,6 @@ static void __net_exit ip_rt_do_proc_exit(struct net *net)
static struct pernet_operations ip_rt_proc_ops __net_initdata = {
.init = ip_rt_do_proc_init,
.exit = ip_rt_do_proc_exit,
.async = true,
};
static int __init ip_rt_proc_init(void)
@ -3017,7 +3016,6 @@ static __net_exit void sysctl_route_net_exit(struct net *net)
static __net_initdata struct pernet_operations sysctl_route_ops = {
.init = sysctl_route_net_init,
.exit = sysctl_route_net_exit,
.async = true,
};
#endif
@ -3031,7 +3029,6 @@ static __net_init int rt_genid_init(struct net *net)
static __net_initdata struct pernet_operations rt_genid_ops = {
.init = rt_genid_init,
.async = true,
};
static int __net_init ipv4_inetpeer_init(struct net *net)
@ -3057,7 +3054,6 @@ static void __net_exit ipv4_inetpeer_exit(struct net *net)
static __net_initdata struct pernet_operations ipv4_inetpeer_ops = {
.init = ipv4_inetpeer_init,
.exit = ipv4_inetpeer_exit,
.async = true,
};
#ifdef CONFIG_IP_ROUTE_CLASSID

View File

@ -1219,7 +1219,6 @@ static __net_exit void ipv4_sysctl_exit_net(struct net *net)
static __net_initdata struct pernet_operations ipv4_sysctl_ops = {
.init = ipv4_sysctl_init_net,
.exit = ipv4_sysctl_exit_net,
.async = true,
};
static __init int sysctl_ipv4_init(void)

View File

@ -2391,7 +2391,6 @@ static void __net_exit tcp4_proc_exit_net(struct net *net)
static struct pernet_operations tcp4_net_ops = {
.init = tcp4_proc_init_net,
.exit = tcp4_proc_exit_net,
.async = true,
};
int __init tcp4_proc_init(void)
@ -2578,7 +2577,6 @@ static struct pernet_operations __net_initdata tcp_sk_ops = {
.init = tcp_sk_init,
.exit = tcp_sk_exit,
.exit_batch = tcp_sk_exit_batch,
.async = true,
};
void __init tcp_v4_init(void)

View File

@ -1024,7 +1024,6 @@ static void __net_exit tcp_net_metrics_exit_batch(struct list_head *net_exit_lis
static __net_initdata struct pernet_operations tcp_net_metrics_ops = {
.init = tcp_net_metrics_init,
.exit_batch = tcp_net_metrics_exit_batch,
.async = true,
};
void __init tcp_metrics_init(void)

View File

@ -2756,7 +2756,6 @@ static void __net_exit udp4_proc_exit_net(struct net *net)
static struct pernet_operations udp4_net_ops = {
.init = udp4_proc_init_net,
.exit = udp4_proc_exit_net,
.async = true,
};
int __init udp4_proc_init(void)
@ -2843,7 +2842,6 @@ static int __net_init udp_sysctl_init(struct net *net)
static struct pernet_operations __net_initdata udp_sysctl_ops = {
.init = udp_sysctl_init,
.async = true,
};
void __init udp_init(void)

View File

@ -104,7 +104,6 @@ static void __net_exit udplite4_proc_exit_net(struct net *net)
static struct pernet_operations udplite4_net_ops = {
.init = udplite4_proc_init_net,
.exit = udplite4_proc_exit_net,
.async = true,
};
static __init int udplite4_proc_init(void)

View File

@ -367,7 +367,6 @@ static void __net_exit xfrm4_net_exit(struct net *net)
static struct pernet_operations __net_initdata xfrm4_net_ops = {
.init = xfrm4_net_init,
.exit = xfrm4_net_exit,
.async = true,
};
static void __init xfrm4_policy_init(void)

View File

@ -4282,7 +4282,6 @@ static void __net_exit if6_proc_net_exit(struct net *net)
static struct pernet_operations if6_proc_net_ops = {
.init = if6_proc_net_init,
.exit = if6_proc_net_exit,
.async = true,
};
int __init if6_proc_init(void)
@ -6592,7 +6591,6 @@ static void __net_exit addrconf_exit_net(struct net *net)
static struct pernet_operations addrconf_ops = {
.init = addrconf_init_net,
.exit = addrconf_exit_net,
.async = true,
};
static struct rtnl_af_ops inet6_ops __read_mostly = {

View File

@ -344,7 +344,6 @@ static void __net_exit ip6addrlbl_net_exit(struct net *net)
static struct pernet_operations ipv6_addr_label_ops = {
.init = ip6addrlbl_net_init,
.exit = ip6addrlbl_net_exit,
.async = true,
};
int __init ipv6_addr_label_init(void)

View File

@ -857,7 +857,6 @@ static void __net_exit inet6_net_exit(struct net *net)
static struct pernet_operations inet6_net_ops = {
.init = inet6_net_init,
.exit = inet6_net_exit,
.async = true,
};
static const struct ipv6_stub ipv6_stub_impl = {

View File

@ -397,7 +397,6 @@ static void __net_exit fib6_rules_net_exit(struct net *net)
static struct pernet_operations fib6_rules_net_ops = {
.init = fib6_rules_net_init,
.exit = fib6_rules_net_exit,
.async = true,
};
int __init fib6_rules_init(void)

View File

@ -998,7 +998,6 @@ static void __net_exit icmpv6_sk_exit(struct net *net)
static struct pernet_operations icmpv6_sk_ops = {
.init = icmpv6_sk_init,
.exit = icmpv6_sk_exit,
.async = true,
};
int __init icmpv6_init(void)

View File

@ -613,7 +613,6 @@ static struct pernet_operations ila_net_ops = {
.exit = ila_exit_net,
.id = &ila_net_id,
.size = sizeof(struct ila_net),
.async = true,
};
static int ila_xlat_addr(struct sk_buff *skb, bool sir2ila)

View File

@ -2161,7 +2161,6 @@ static void fib6_net_exit(struct net *net)
static struct pernet_operations fib6_net_ops = {
.init = fib6_net_init,
.exit = fib6_net_exit,
.async = true,
};
int __init fib6_init(void)

View File

@ -873,7 +873,6 @@ static void __net_exit ip6_flowlabel_net_exit(struct net *net)
static struct pernet_operations ip6_flowlabel_net_ops = {
.init = ip6_flowlabel_proc_init,
.exit = ip6_flowlabel_net_exit,
.async = true,
};
int ip6_flowlabel_init(void)

View File

@ -1528,7 +1528,6 @@ static struct pernet_operations ip6gre_net_ops = {
.exit_batch = ip6gre_exit_batch_net,
.id = &ip6gre_net_id,
.size = sizeof(struct ip6gre_net),
.async = true,
};
static int ip6gre_tunnel_validate(struct nlattr *tb[], struct nlattr *data[],

View File

@ -2260,7 +2260,6 @@ static struct pernet_operations ip6_tnl_net_ops = {
.exit_batch = ip6_tnl_exit_batch_net,
.id = &ip6_tnl_net_id,
.size = sizeof(struct ip6_tnl_net),
.async = true,
};
/**

View File

@ -1148,7 +1148,6 @@ static struct pernet_operations vti6_net_ops = {
.exit_batch = vti6_exit_batch_net,
.id = &vti6_net_id,
.size = sizeof(struct vti6_net),
.async = true,
};
static struct xfrm6_protocol vti_esp6_protocol __read_mostly = {

View File

@ -1348,7 +1348,6 @@ static void __net_exit ip6mr_net_exit(struct net *net)
static struct pernet_operations ip6mr_net_ops = {
.init = ip6mr_net_init,
.exit = ip6mr_net_exit,
.async = true,
};
int __init ip6_mr_init(void)

View File

@ -2997,7 +2997,6 @@ static void __net_exit igmp6_net_exit(struct net *net)
static struct pernet_operations igmp6_net_ops = {
.init = igmp6_net_init,
.exit = igmp6_net_exit,
.async = true,
};
int __init igmp6_init(void)

View File

@ -1883,7 +1883,6 @@ static void __net_exit ndisc_net_exit(struct net *net)
static struct pernet_operations ndisc_net_ops = {
.init = ndisc_net_init,
.exit = ndisc_net_exit,
.async = true,
};
int __init ndisc_init(void)

View File

@ -1928,7 +1928,6 @@ static void __net_exit ip6_tables_net_exit(struct net *net)
static struct pernet_operations ip6_tables_net_ops = {
.init = ip6_tables_net_init,
.exit = ip6_tables_net_exit,
.async = true,
};
static int __init ip6_tables_init(void)

View File

@ -87,7 +87,6 @@ static void __net_exit ip6table_filter_net_exit(struct net *net)
static struct pernet_operations ip6table_filter_net_ops = {
.init = ip6table_filter_net_init,
.exit = ip6table_filter_net_exit,
.async = true,
};
static int __init ip6table_filter_init(void)

View File

@ -107,7 +107,6 @@ static void __net_exit ip6table_mangle_net_exit(struct net *net)
static struct pernet_operations ip6table_mangle_net_ops = {
.exit = ip6table_mangle_net_exit,
.async = true,
};
static int __init ip6table_mangle_init(void)

View File

@ -131,7 +131,6 @@ static void __net_exit ip6table_nat_net_exit(struct net *net)
static struct pernet_operations ip6table_nat_net_ops = {
.exit = ip6table_nat_net_exit,
.async = true,
};
static int __init ip6table_nat_init(void)

View File

@ -75,7 +75,6 @@ static void __net_exit ip6table_raw_net_exit(struct net *net)
static struct pernet_operations ip6table_raw_net_ops = {
.exit = ip6table_raw_net_exit,
.async = true,
};
static int __init ip6table_raw_init(void)

Some files were not shown because too many files have changed in this diff Show More