diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index c100b44f2b87cc64b48c9bdb36b25b2fcf73e05c..5fae04506ad93152a2f3924e98a5ac8963164504 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c @@ -1478,8 +1478,11 @@ int __init fib6_init(void) int ret; fib6_node_kmem = kmem_cache_create("fib6_nodes", sizeof(struct fib6_node), - 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC, + 0, SLAB_HWCACHE_ALIGN, NULL); + if (!fib6_node_kmem) + return -ENOMEM; + fib6_tables_init(); ret = __rtnl_register(PF_INET6, RTM_GETROUTE, NULL, inet6_dump_fib); diff --git a/net/ipv6/route.c b/net/ipv6/route.c index d7754abf9216b0f7c7178624b29f3d2712250a28..6f833cacfcfb10b99db31f26c898f00e7cbdaad3 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c @@ -2474,7 +2474,10 @@ int __init ip6_route_init(void) ip6_dst_ops.kmem_cachep = kmem_cache_create("ip6_dst_cache", sizeof(struct rt6_info), 0, - SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL); + SLAB_HWCACHE_ALIGN, NULL); + if (!ip6_dst_ops.kmem_cachep) + return -ENOMEM; + ip6_dst_blackhole_ops.kmem_cachep = ip6_dst_ops.kmem_cachep; ret = fib6_init();