aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/core/flow.c6
-rw-r--r--net/core/neighbour.c12
-rw-r--r--net/core/skbuff.c9
-rw-r--r--net/decnet/dn_route.c11
-rw-r--r--net/ipv4/inetpeer.c5
-rw-r--r--net/ipv4/ipmr.c5
-rw-r--r--net/ipv4/route.c10
-rw-r--r--net/ipv4/tcp.c4
-rw-r--r--net/ipv6/ip6_fib.c4
-rw-r--r--net/ipv6/route.c10
-rw-r--r--net/xfrm/xfrm_input.c4
-rw-r--r--net/xfrm/xfrm_policy.c4
12 files changed, 22 insertions, 62 deletions
diff --git a/net/core/flow.c b/net/core/flow.c
index 645241165e6c..f23e7e386543 100644
--- a/net/core/flow.c
+++ b/net/core/flow.c
@@ -343,12 +343,8 @@ static int __init flow_cache_init(void)
343 343
344 flow_cachep = kmem_cache_create("flow_cache", 344 flow_cachep = kmem_cache_create("flow_cache",
345 sizeof(struct flow_cache_entry), 345 sizeof(struct flow_cache_entry),
346 0, SLAB_HWCACHE_ALIGN, 346 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC,
347 NULL, NULL); 347 NULL, NULL);
348
349 if (!flow_cachep)
350 panic("NET: failed to allocate flow cache slab\n");
351
352 flow_hash_shift = 10; 348 flow_hash_shift = 10;
353 flow_lwm = 2 * flow_hash_size; 349 flow_lwm = 2 * flow_hash_size;
354 flow_hwm = 4 * flow_hash_size; 350 flow_hwm = 4 * flow_hash_size;
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index c0a27407f445..a45bd2124d6b 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1339,14 +1339,10 @@ void neigh_table_init_no_netlink(struct neigh_table *tbl)
1339 neigh_rand_reach_time(tbl->parms.base_reachable_time); 1339 neigh_rand_reach_time(tbl->parms.base_reachable_time);
1340 1340
1341 if (!tbl->kmem_cachep) 1341 if (!tbl->kmem_cachep)
1342 tbl->kmem_cachep = kmem_cache_create(tbl->id, 1342 tbl->kmem_cachep =
1343 tbl->entry_size, 1343 kmem_cache_create(tbl->id, tbl->entry_size, 0,
1344 0, SLAB_HWCACHE_ALIGN, 1344 SLAB_HWCACHE_ALIGN|SLAB_PANIC,
1345 NULL, NULL); 1345 NULL, NULL);
1346
1347 if (!tbl->kmem_cachep)
1348 panic("cannot create neighbour cache");
1349
1350 tbl->stats = alloc_percpu(struct neigh_statistics); 1346 tbl->stats = alloc_percpu(struct neigh_statistics);
1351 if (!tbl->stats) 1347 if (!tbl->stats)
1352 panic("cannot create neighbour cache statistics"); 1348 panic("cannot create neighbour cache statistics");
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 8a476f1956e5..c448c7f6fde2 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -2046,19 +2046,14 @@ void __init skb_init(void)
2046 skbuff_head_cache = kmem_cache_create("skbuff_head_cache", 2046 skbuff_head_cache = kmem_cache_create("skbuff_head_cache",
2047 sizeof(struct sk_buff), 2047 sizeof(struct sk_buff),
2048 0, 2048 0,
2049 SLAB_HWCACHE_ALIGN, 2049 SLAB_HWCACHE_ALIGN|SLAB_PANIC,
2050 NULL, NULL); 2050 NULL, NULL);
2051 if (!skbuff_head_cache)
2052 panic("cannot create skbuff cache");
2053
2054 skbuff_fclone_cache = kmem_cache_create("skbuff_fclone_cache", 2051 skbuff_fclone_cache = kmem_cache_create("skbuff_fclone_cache",
2055 (2*sizeof(struct sk_buff)) + 2052 (2*sizeof(struct sk_buff)) +
2056 sizeof(atomic_t), 2053 sizeof(atomic_t),
2057 0, 2054 0,
2058 SLAB_HWCACHE_ALIGN, 2055 SLAB_HWCACHE_ALIGN|SLAB_PANIC,
2059 NULL, NULL); 2056 NULL, NULL);
2060 if (!skbuff_fclone_cache)
2061 panic("cannot create skbuff cache");
2062} 2057}
2063 2058
2064EXPORT_SYMBOL(___pskb_trim); 2059EXPORT_SYMBOL(___pskb_trim);
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index c5daf3557c1f..dd0761e3d280 100644
--- a/net/decnet/dn_route.c
+++ b/net/decnet/dn_route.c
@@ -1781,14 +1781,9 @@ void __init dn_route_init(void)
1781{ 1781{
1782 int i, goal, order; 1782 int i, goal, order;
1783 1783
1784 dn_dst_ops.kmem_cachep = kmem_cache_create("dn_dst_cache", 1784 dn_dst_ops.kmem_cachep =
1785 sizeof(struct dn_route), 1785 kmem_cache_create("dn_dst_cache", sizeof(struct dn_route), 0,
1786 0, SLAB_HWCACHE_ALIGN, 1786 SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL);
1787 NULL, NULL);
1788
1789 if (!dn_dst_ops.kmem_cachep)
1790 panic("DECnet: Failed to allocate dn_dst_cache\n");
1791
1792 init_timer(&dn_route_timer); 1787 init_timer(&dn_route_timer);
1793 dn_route_timer.function = dn_dst_check_expire; 1788 dn_route_timer.function = dn_dst_check_expire;
1794 dn_route_timer.expires = jiffies + decnet_dst_gc_interval * HZ; 1789 dn_route_timer.expires = jiffies + decnet_dst_gc_interval * HZ;
diff --git a/net/ipv4/inetpeer.c b/net/ipv4/inetpeer.c
index 03ff62ebcfeb..a675602ef295 100644
--- a/net/ipv4/inetpeer.c
+++ b/net/ipv4/inetpeer.c
@@ -126,12 +126,9 @@ void __init inet_initpeers(void)
126 126
127 peer_cachep = kmem_cache_create("inet_peer_cache", 127 peer_cachep = kmem_cache_create("inet_peer_cache",
128 sizeof(struct inet_peer), 128 sizeof(struct inet_peer),
129 0, SLAB_HWCACHE_ALIGN, 129 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC,
130 NULL, NULL); 130 NULL, NULL);
131 131
132 if (!peer_cachep)
133 panic("cannot create inet_peer_cache");
134
135 /* All the timers, started at system startup tend 132 /* All the timers, started at system startup tend
136 to synchronize. Perturb it a bit. 133 to synchronize. Perturb it a bit.
137 */ 134 */
diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c
index 98f0aa0d4216..ba49588da242 100644
--- a/net/ipv4/ipmr.c
+++ b/net/ipv4/ipmr.c
@@ -1900,11 +1900,8 @@ void __init ip_mr_init(void)
1900{ 1900{
1901 mrt_cachep = kmem_cache_create("ip_mrt_cache", 1901 mrt_cachep = kmem_cache_create("ip_mrt_cache",
1902 sizeof(struct mfc_cache), 1902 sizeof(struct mfc_cache),
1903 0, SLAB_HWCACHE_ALIGN, 1903 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC,
1904 NULL, NULL); 1904 NULL, NULL);
1905 if (!mrt_cachep)
1906 panic("cannot allocate ip_mrt_cache");
1907
1908 init_timer(&ipmr_expire_timer); 1905 init_timer(&ipmr_expire_timer);
1909 ipmr_expire_timer.function=ipmr_expire_process; 1906 ipmr_expire_timer.function=ipmr_expire_process;
1910 register_netdevice_notifier(&ip_mr_notifier); 1907 register_netdevice_notifier(&ip_mr_notifier);
diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index a4d4cb85a16c..20ffe8e88c0f 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -3147,13 +3147,9 @@ int __init ip_rt_init(void)
3147 } 3147 }
3148#endif 3148#endif
3149 3149
3150 ipv4_dst_ops.kmem_cachep = kmem_cache_create("ip_dst_cache", 3150 ipv4_dst_ops.kmem_cachep =
3151 sizeof(struct rtable), 3151 kmem_cache_create("ip_dst_cache", sizeof(struct rtable), 0,
3152 0, SLAB_HWCACHE_ALIGN, 3152 SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL);
3153 NULL, NULL);
3154
3155 if (!ipv4_dst_ops.kmem_cachep)
3156 panic("IP: failed to allocate ip_dst_cache\n");
3157 3153
3158 rt_hash_table = (struct rt_hash_bucket *) 3154 rt_hash_table = (struct rt_hash_bucket *)
3159 alloc_large_system_hash("IP route cache", 3155 alloc_large_system_hash("IP route cache",
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index e570db4d33c8..29e3d606db78 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2254,9 +2254,7 @@ void __init tcp_init(void)
2254 tcp_hashinfo.bind_bucket_cachep = 2254 tcp_hashinfo.bind_bucket_cachep =
2255 kmem_cache_create("tcp_bind_bucket", 2255 kmem_cache_create("tcp_bind_bucket",
2256 sizeof(struct inet_bind_bucket), 0, 2256 sizeof(struct inet_bind_bucket), 0,
2257 SLAB_HWCACHE_ALIGN, NULL, NULL); 2257 SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL);
2258 if (!tcp_hashinfo.bind_bucket_cachep)
2259 panic("tcp_init: Cannot alloc tcp_bind_bucket cache.");
2260 2258
2261 /* Size and allocate the main established and bind bucket 2259 /* Size and allocate the main established and bind bucket
2262 * hash tables. 2260 * hash tables.
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index fbca60950b14..8fcae7a6510b 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -1472,10 +1472,8 @@ void __init fib6_init(void)
1472{ 1472{
1473 fib6_node_kmem = kmem_cache_create("fib6_nodes", 1473 fib6_node_kmem = kmem_cache_create("fib6_nodes",
1474 sizeof(struct fib6_node), 1474 sizeof(struct fib6_node),
1475 0, SLAB_HWCACHE_ALIGN, 1475 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC,
1476 NULL, NULL); 1476 NULL, NULL);
1477 if (!fib6_node_kmem)
1478 panic("cannot create fib6_nodes cache");
1479 1477
1480 fib6_tables_init(); 1478 fib6_tables_init();
1481} 1479}
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index d83844d9499b..ba1b3d11865e 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -2419,13 +2419,9 @@ void __init ip6_route_init(void)
2419{ 2419{
2420 struct proc_dir_entry *p; 2420 struct proc_dir_entry *p;
2421 2421
2422 ip6_dst_ops.kmem_cachep = kmem_cache_create("ip6_dst_cache", 2422 ip6_dst_ops.kmem_cachep =
2423 sizeof(struct rt6_info), 2423 kmem_cache_create("ip6_dst_cache", sizeof(struct rt6_info), 0,
2424 0, SLAB_HWCACHE_ALIGN, 2424 SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL);
2425 NULL, NULL);
2426 if (!ip6_dst_ops.kmem_cachep)
2427 panic("cannot create ip6_dst_cache");
2428
2429 fib6_init(); 2425 fib6_init();
2430#ifdef CONFIG_PROC_FS 2426#ifdef CONFIG_PROC_FS
2431 p = proc_net_create("ipv6_route", 0, rt6_proc_info); 2427 p = proc_net_create("ipv6_route", 0, rt6_proc_info);
diff --git a/net/xfrm/xfrm_input.c b/net/xfrm/xfrm_input.c
index 891a6090cc09..dfc90bb1cf1f 100644
--- a/net/xfrm/xfrm_input.c
+++ b/net/xfrm/xfrm_input.c
@@ -82,8 +82,6 @@ void __init xfrm_input_init(void)
82{ 82{
83 secpath_cachep = kmem_cache_create("secpath_cache", 83 secpath_cachep = kmem_cache_create("secpath_cache",
84 sizeof(struct sec_path), 84 sizeof(struct sec_path),
85 0, SLAB_HWCACHE_ALIGN, 85 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC,
86 NULL, NULL); 86 NULL, NULL);
87 if (!secpath_cachep)
88 panic("XFRM: failed to allocate secpath_cache\n");
89} 87}
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index 1cf3209cdf4b..7db1c48537f0 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -1985,10 +1985,8 @@ static void __init xfrm_policy_init(void)
1985 1985
1986 xfrm_dst_cache = kmem_cache_create("xfrm_dst_cache", 1986 xfrm_dst_cache = kmem_cache_create("xfrm_dst_cache",
1987 sizeof(struct xfrm_dst), 1987 sizeof(struct xfrm_dst),
1988 0, SLAB_HWCACHE_ALIGN, 1988 0, SLAB_HWCACHE_ALIGN|SLAB_PANIC,
1989 NULL, NULL); 1989 NULL, NULL);
1990 if (!xfrm_dst_cache)
1991 panic("XFRM: failed to allocate xfrm_dst_cache\n");
1992 1990
1993 hmask = 8 - 1; 1991 hmask = 8 - 1;
1994 sz = (hmask+1) * sizeof(struct hlist_head); 1992 sz = (hmask+1) * sizeof(struct hlist_head);