lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 17 Nov 2017 21:30:26 +0300
From:   Kirill Tkhai <ktkhai@...tuozzo.com>
To:     davem@...emloft.net, vyasevic@...hat.com,
        kstewart@...uxfoundation.org, pombredanne@...b.com,
        vyasevich@...il.com, mark.rutland@....com,
        gregkh@...uxfoundation.org, adobriyan@...il.com, fw@...len.de,
        nicolas.dichtel@...nd.com, xiyou.wangcong@...il.com,
        roman.kapl@...go.com, paul@...l-moore.com, dsahern@...il.com,
        daniel@...earbox.net, lucien.xin@...il.com,
        mschiffer@...verse-factory.net, rshearma@...cade.com,
        linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
        ktkhai@...tuozzo.com, ebiederm@...ssion.com, avagin@...tuozzo.com,
        gorcunov@...tuozzo.com, eric.dumazet@...il.com,
        stephen@...workplumber.org, ktkhai@...tuozzo.com
Subject: [PATCH RFC 20/25] net: Move pernet_subsys,
 registered via net_dev_init(), to pernet_sys list

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 <ktkhai@...tuozzo.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;
 }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ