aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/af_inet6.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv6/af_inet6.c')
-rw-r--r--net/ipv6/af_inet6.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index 60461ad7fa6f..95055f8c3f35 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -150,7 +150,7 @@ lookup_protocol:
150 answer_flags = answer->flags; 150 answer_flags = answer->flags;
151 rcu_read_unlock(); 151 rcu_read_unlock();
152 152
153 BUG_TRAP(answer_prot->slab != NULL); 153 WARN_ON(answer_prot->slab == NULL);
154 154
155 err = -ENOBUFS; 155 err = -ENOBUFS;
156 sk = sk_alloc(net, PF_INET6, GFP_KERNEL, answer_prot); 156 sk = sk_alloc(net, PF_INET6, GFP_KERNEL, answer_prot);
@@ -934,6 +934,11 @@ static int __init inet6_init(void)
934 if (err) 934 if (err)
935 goto out_unregister_sock; 935 goto out_unregister_sock;
936 936
937#ifdef CONFIG_SYSCTL
938 err = ipv6_static_sysctl_register();
939 if (err)
940 goto static_sysctl_fail;
941#endif
937 /* 942 /*
938 * ipngwg API draft makes clear that the correct semantics 943 * ipngwg API draft makes clear that the correct semantics
939 * for TCP and UDP is to consider one TCP and UDP instance 944 * for TCP and UDP is to consider one TCP and UDP instance
@@ -1058,6 +1063,10 @@ ipmr_fail:
1058icmp_fail: 1063icmp_fail:
1059 unregister_pernet_subsys(&inet6_net_ops); 1064 unregister_pernet_subsys(&inet6_net_ops);
1060register_pernet_fail: 1065register_pernet_fail:
1066#ifdef CONFIG_SYSCTL
1067 ipv6_static_sysctl_unregister();
1068static_sysctl_fail:
1069#endif
1061 cleanup_ipv6_mibs(); 1070 cleanup_ipv6_mibs();
1062out_unregister_sock: 1071out_unregister_sock:
1063 sock_unregister(PF_INET6); 1072 sock_unregister(PF_INET6);
@@ -1113,6 +1122,9 @@ static void __exit inet6_exit(void)
1113 rawv6_exit(); 1122 rawv6_exit();
1114 1123
1115 unregister_pernet_subsys(&inet6_net_ops); 1124 unregister_pernet_subsys(&inet6_net_ops);
1125#ifdef CONFIG_SYSCTL
1126 ipv6_static_sysctl_unregister();
1127#endif
1116 cleanup_ipv6_mibs(); 1128 cleanup_ipv6_mibs();
1117 proto_unregister(&rawv6_prot); 1129 proto_unregister(&rawv6_prot);
1118 proto_unregister(&udplitev6_prot); 1130 proto_unregister(&udplitev6_prot);