aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/af_inet6.c15
-rw-r--r--net/ipv6/tcp_ipv6.c8
2 files changed, 14 insertions, 9 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index e3e09147d134..f52bdaed8a1b 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -859,15 +859,25 @@ static int inet6_net_init(struct net *net)
859 err = udp6_proc_init(net); 859 err = udp6_proc_init(net);
860 if (err) 860 if (err)
861 goto out; 861 goto out;
862 err = tcp6_proc_init(net);
863 if (err)
864 goto proc_tcp6_fail;
862out: 865out:
863#endif 866#endif
864 return err; 867 return err;
868
869#ifdef CONFIG_PROC_FS
870proc_tcp6_fail:
871 udp6_proc_exit(net);
872 goto out;
873#endif
865} 874}
866 875
867static void inet6_net_exit(struct net *net) 876static void inet6_net_exit(struct net *net)
868{ 877{
869#ifdef CONFIG_PROC_FS 878#ifdef CONFIG_PROC_FS
870 udp6_proc_exit(net); 879 udp6_proc_exit(net);
880 tcp6_proc_exit(net);
871#endif 881#endif
872} 882}
873 883
@@ -951,8 +961,6 @@ static int __init inet6_init(void)
951 err = -ENOMEM; 961 err = -ENOMEM;
952 if (raw6_proc_init()) 962 if (raw6_proc_init())
953 goto proc_raw6_fail; 963 goto proc_raw6_fail;
954 if (tcp6_proc_init())
955 goto proc_tcp6_fail;
956 if (udplite6_proc_init()) 964 if (udplite6_proc_init())
957 goto proc_udplite6_fail; 965 goto proc_udplite6_fail;
958 if (ipv6_misc_proc_init()) 966 if (ipv6_misc_proc_init())
@@ -1037,8 +1045,6 @@ proc_anycast6_fail:
1037proc_misc6_fail: 1045proc_misc6_fail:
1038 udplite6_proc_exit(); 1046 udplite6_proc_exit();
1039proc_udplite6_fail: 1047proc_udplite6_fail:
1040 tcp6_proc_exit();
1041proc_tcp6_fail:
1042 raw6_proc_exit(); 1048 raw6_proc_exit();
1043proc_raw6_fail: 1049proc_raw6_fail:
1044#endif 1050#endif
@@ -1098,7 +1104,6 @@ static void __exit inet6_exit(void)
1098 ac6_proc_exit(); 1104 ac6_proc_exit();
1099 ipv6_misc_proc_exit(); 1105 ipv6_misc_proc_exit();
1100 udplite6_proc_exit(); 1106 udplite6_proc_exit();
1101 tcp6_proc_exit();
1102 raw6_proc_exit(); 1107 raw6_proc_exit();
1103#endif 1108#endif
1104 ipv6_netfilter_fini(); 1109 ipv6_netfilter_fini();
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index caf0cc1c00e1..56d0cea7d578 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -2129,14 +2129,14 @@ static struct tcp_seq_afinfo tcp6_seq_afinfo = {
2129 .seq_fops = &tcp6_seq_fops, 2129 .seq_fops = &tcp6_seq_fops,
2130}; 2130};
2131 2131
2132int __init tcp6_proc_init(void) 2132int tcp6_proc_init(struct net *net)
2133{ 2133{
2134 return tcp_proc_register(&tcp6_seq_afinfo); 2134 return tcp_proc_register(net, &tcp6_seq_afinfo);
2135} 2135}
2136 2136
2137void tcp6_proc_exit(void) 2137void tcp6_proc_exit(struct net *net)
2138{ 2138{
2139 tcp_proc_unregister(&tcp6_seq_afinfo); 2139 tcp_proc_unregister(net, &tcp6_seq_afinfo);
2140} 2140}
2141#endif 2141#endif
2142 2142