According to net/core/Makefile, net/core/af_netlink.o
core initcalls execute right after net/core/net_namespace.o.

The methods of netlink_net_ops create and destroy "netlink"
file, which are not interested for foreigh pernet_operations.
So, netlink_net_ops may safely be moved to pernet_sys list.

Signed-off-by: Kirill Tkhai <ktk...@virtuozzo.com>
---
 net/netlink/af_netlink.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index b9e0ee4e22f5..a4f1f5222b79 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -2735,7 +2735,7 @@ static int __init netlink_proto_init(void)
        netlink_add_usersock_entry();
 
        sock_register(&netlink_family_ops);
-       register_pernet_subsys(&netlink_net_ops);
+       register_pernet_sys(&netlink_net_ops);
        /* The netlink device handler may be needed early. */
        rtnetlink_init();
 out:

Reply via email to