diff options
author | Alexey Dobriyan <adobriyan@gmail.com> | 2006-08-26 22:25:52 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-22 18:18:19 -0400 |
commit | e5d679f33900c71d1a76ba07c5b04055abd34480 (patch) | |
tree | fb581f7156870056dbb91feaab9d3dd22fdcf61e /net/core | |
parent | ff5dfe736dd9f6c74b206aa77c0465dfd503bdb9 (diff) |
[NET]: Use SLAB_PANIC
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/flow.c | 6 | ||||
-rw-r--r-- | net/core/neighbour.c | 12 | ||||
-rw-r--r-- | net/core/skbuff.c | 9 |
3 files changed, 7 insertions, 20 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 | ||
2064 | EXPORT_SYMBOL(___pskb_trim); | 2059 | EXPORT_SYMBOL(___pskb_trim); |