From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kirill Tkhai Subject: [PATCH v2 16/31] net: Convert uevent_net_ops Date: Mon, 20 Nov 2017 21:34:42 +0300 Message-ID: <151120288268.3159.8054431165899560937.stgit@localhost.localdomain> References: <151120175301.3159.9577108443167812854.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-he1eur01on0125.outbound.protection.outlook.com ([104.47.0.125]:47553 "EHLO EUR01-HE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752716AbdKTSex (ORCPT ); Mon, 20 Nov 2017 13:34:53 -0500 In-Reply-To: <151120175301.3159.9577108443167812854.stgit@localhost.localdomain> Sender: netdev-owner@vger.kernel.org List-ID: 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 make uevent_net_ops async. Signed-off-by: Kirill Tkhai --- lib/kobject_uevent.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c index c3e84edc47c9..4a2c39ae1e65 100644 --- a/lib/kobject_uevent.c +++ b/lib/kobject_uevent.c @@ -643,6 +643,7 @@ 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)