aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/ip6_fib.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-06-16 04:12:19 -0400
committerDavid S. Miller <davem@davemloft.net>2012-06-16 04:12:19 -0400
commite8803b6c387129059e04d9e14d49efda250a7361 (patch)
tree147fe0ff12046cabcb3a4c39d07a751b79707ddb /net/ipv6/ip6_fib.c
parent2a0c451ade8e1783c5d453948289e4a978d417c9 (diff)
Revert "ipv6: Prevent access to uninitialized fib_table_hash via /proc/net/ipv6_route"
This reverts commit 2a0c451ade8e1783c5d453948289e4a978d417c9. It causes crashes, because now ip6_null_entry is used before it is initialized. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ip6_fib.c')
-rw-r--r--net/ipv6/ip6_fib.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index fbd4afff05fa..74c21b924a79 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -1692,25 +1692,21 @@ int __init fib6_init(void)
1692 ret = register_pernet_subsys(&fib6_net_ops); 1692 ret = register_pernet_subsys(&fib6_net_ops);
1693 if (ret) 1693 if (ret)
1694 goto out_kmem_cache_create; 1694 goto out_kmem_cache_create;
1695
1696 ret = __rtnl_register(PF_INET6, RTM_GETROUTE, NULL, inet6_dump_fib,
1697 NULL);
1698 if (ret)
1699 goto out_unregister_subsys;
1695out: 1700out:
1696 return ret; 1701 return ret;
1697 1702
1703out_unregister_subsys:
1704 unregister_pernet_subsys(&fib6_net_ops);
1698out_kmem_cache_create: 1705out_kmem_cache_create:
1699 kmem_cache_destroy(fib6_node_kmem); 1706 kmem_cache_destroy(fib6_node_kmem);
1700 goto out; 1707 goto out;
1701} 1708}
1702 1709
1703int __init fib6_init_late(void)
1704{
1705 return __rtnl_register(PF_INET6, RTM_GETROUTE, NULL, inet6_dump_fib,
1706 NULL);
1707}
1708
1709void fib6_cleanup_late(void)
1710{
1711 rtnl_unregister(PF_INET6, RTM_GETROUTE);
1712}
1713
1714void fib6_gc_cleanup(void) 1710void fib6_gc_cleanup(void)
1715{ 1711{
1716 unregister_pernet_subsys(&fib6_net_ops); 1712 unregister_pernet_subsys(&fib6_net_ops);