From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kirill Tkhai Subject: [PATCH RFC 15/25] net: Move netlink_net_ops to pernet_sys list Date: Fri, 17 Nov 2017 21:29:40 +0300 Message-ID: <151094338042.20009.12189551092794551675.stgit@localhost.localdomain> References: <151094119999.20009.6955267140148739392.stgit@localhost.localdomain> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit To: davem@davemloft.net, vyasevic@redhat.com, kstewart@linuxfoundation.org, pombredanne@nexb.com, vyasevich@gmail.com, mark.rutland@arm.com, gregkh@linuxfoundation.org, adobriyan@gmail.com, fw@strlen.de, nicolas.dichtel@6wind.com, xiyou.wangcong@gmail.com, roman.kapl@sysgo.com, paul@paul-moore.com, dsahern@gmail.com, daniel@iogearbox.net, lucien.xin@gmail.com, mschiffer@universe-factory.net, rshearma@brocade.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, ktkhai@virtuozzo.com, ebiederm@xmission.com, avagin@virtuozzo.com, gorcunov@virtuozzo.com, eric.dumazet@gmail.com, stephen@networkplumber.org, ktkhai@virtuozzo.com Return-path: Received: from mail-he1eur01on0138.outbound.protection.outlook.com ([104.47.0.138]:52558 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753485AbdKQS3u (ORCPT ); Fri, 17 Nov 2017 13:29:50 -0500 In-Reply-To: <151094119999.20009.6955267140148739392.stgit@localhost.localdomain> Sender: netdev-owner@vger.kernel.org List-ID: 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 --- 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: