From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kirill Tkhai Subject: [PATCH RFC 18/25] net: Move uevent_net_ops to pernet_sys list Date: Fri, 17 Nov 2017 21:30:07 +0300 Message-ID: <151094340710.20009.3620861813536087132.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: In-Reply-To: <151094119999.20009.6955267140148739392.stgit@localhost.localdomain> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org This postcore_initcall() created pernet_operations are registered from ./lib directory, and they have to go right after audit_net_ops. uevent_net_init() and uevent_net_exit() create and destroy netlink socket, and these actions serialized in netlink code. Parallel execution with other pernet_operations makes the socket disappear earlier from uevent_sock_list on ->exit. As userspace can't be interested in broadcast messages of dying net, and, as I see, no one in kernel listen them, we may safely move uevent_net_ops to pernet_sys list. Signed-off-by: Kirill Tkhai --- lib/kobject_uevent.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c index c3e84edc47c9..84c9d85477cc 100644 --- a/lib/kobject_uevent.c +++ b/lib/kobject_uevent.c @@ -647,7 +647,7 @@ static struct pernet_operations uevent_net_ops = { static int __init kobject_uevent_init(void) { - return register_pernet_subsys(&uevent_net_ops); + return register_pernet_sys(&uevent_net_ops); }