net/core/dev.o is lined after net/core/sock.o. There are: 1)dev_proc_ops and dev_mc_net_ops, which create and destroy pernet proc file and not interested to another net namespaces; 2)netdev_net_ops, which creates pernet hash, which is not touched by another pernet_operations.
So, move it to pernet_sys list. Signed-off-by: Kirill Tkhai <ktk...@virtuozzo.com> --- net/core/dev.c | 2 +- net/core/net-procfs.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/net/core/dev.c b/net/core/dev.c index 8ee29f4f5fa9..b90a503a9e1a 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -8787,7 +8787,7 @@ static int __init net_dev_init(void) INIT_LIST_HEAD(&offload_base); - if (register_pernet_subsys(&netdev_net_ops)) + if (register_pernet_sys(&netdev_net_ops)) goto out; /* diff --git a/net/core/net-procfs.c b/net/core/net-procfs.c index 615ccab55f38..46096219d574 100644 --- a/net/core/net-procfs.c +++ b/net/core/net-procfs.c @@ -413,8 +413,8 @@ static struct pernet_operations __net_initdata dev_mc_net_ops = { int __init dev_proc_init(void) { - int ret = register_pernet_subsys(&dev_proc_ops); + int ret = register_pernet_sys(&dev_proc_ops); if (!ret) - return register_pernet_subsys(&dev_mc_net_ops); + return register_pernet_sys(&dev_mc_net_ops); return ret; }