diff options
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/ip6_fib.c | 5 | ||||
-rw-r--r-- | net/ipv6/route.c | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index c100b44f2b87..5fae04506ad9 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c | |||
@@ -1478,8 +1478,11 @@ int __init fib6_init(void) | |||
1478 | int ret; | 1478 | int ret; |
1479 | fib6_node_kmem = kmem_cache_create("fib6_nodes", | 1479 | fib6_node_kmem = kmem_cache_create("fib6_nodes", |
1480 | sizeof(struct fib6_node), | 1480 | sizeof(struct fib6_node), |
1481 | 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, | 1481 | 0, SLAB_HWCACHE_ALIGN, |
1482 | NULL); | 1482 | NULL); |
1483 | if (!fib6_node_kmem) | ||
1484 | return -ENOMEM; | ||
1485 | |||
1483 | fib6_tables_init(); | 1486 | fib6_tables_init(); |
1484 | 1487 | ||
1485 | ret = __rtnl_register(PF_INET6, RTM_GETROUTE, NULL, inet6_dump_fib); | 1488 | ret = __rtnl_register(PF_INET6, RTM_GETROUTE, NULL, inet6_dump_fib); |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index d7754abf9216..6f833cacfcfb 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -2474,7 +2474,10 @@ int __init ip6_route_init(void) | |||
2474 | 2474 | ||
2475 | ip6_dst_ops.kmem_cachep = | 2475 | ip6_dst_ops.kmem_cachep = |
2476 | kmem_cache_create("ip6_dst_cache", sizeof(struct rt6_info), 0, | 2476 | kmem_cache_create("ip6_dst_cache", sizeof(struct rt6_info), 0, |
2477 | SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); | 2477 | SLAB_HWCACHE_ALIGN, NULL); |
2478 | if (!ip6_dst_ops.kmem_cachep) | ||
2479 | return -ENOMEM; | ||
2480 | |||
2478 | ip6_dst_blackhole_ops.kmem_cachep = ip6_dst_ops.kmem_cachep; | 2481 | ip6_dst_blackhole_ops.kmem_cachep = ip6_dst_ops.kmem_cachep; |
2479 | 2482 | ||
2480 | ret = fib6_init(); | 2483 | ret = fib6_init(); |