Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5d679f3 authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by David S. Miller
Browse files

[NET]: Use SLAB_PANIC

parent ff5dfe73
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -343,12 +343,8 @@ static int __init flow_cache_init(void)

	flow_cachep = kmem_cache_create("flow_cache",
					sizeof(struct flow_cache_entry),
					0, SLAB_HWCACHE_ALIGN,
					0, SLAB_HWCACHE_ALIGN|SLAB_PANIC,
					NULL, NULL);

	if (!flow_cachep)
		panic("NET: failed to allocate flow cache slab\n");

	flow_hash_shift = 10;
	flow_lwm = 2 * flow_hash_size;
	flow_hwm = 4 * flow_hash_size;
+4 −8
Original line number Diff line number Diff line
@@ -1339,14 +1339,10 @@ void neigh_table_init_no_netlink(struct neigh_table *tbl)
			  neigh_rand_reach_time(tbl->parms.base_reachable_time);

	if (!tbl->kmem_cachep)
		tbl->kmem_cachep = kmem_cache_create(tbl->id,
						     tbl->entry_size,
						     0, SLAB_HWCACHE_ALIGN,
		tbl->kmem_cachep =
			kmem_cache_create(tbl->id, tbl->entry_size, 0,
					  SLAB_HWCACHE_ALIGN|SLAB_PANIC,
					  NULL, NULL);

	if (!tbl->kmem_cachep)
		panic("cannot create neighbour cache");

	tbl->stats = alloc_percpu(struct neigh_statistics);
	if (!tbl->stats)
		panic("cannot create neighbour cache statistics");
+2 −7
Original line number Diff line number Diff line
@@ -2046,19 +2046,14 @@ void __init skb_init(void)
	skbuff_head_cache = kmem_cache_create("skbuff_head_cache",
					      sizeof(struct sk_buff),
					      0,
					      SLAB_HWCACHE_ALIGN,
					      SLAB_HWCACHE_ALIGN|SLAB_PANIC,
					      NULL, NULL);
	if (!skbuff_head_cache)
		panic("cannot create skbuff cache");

	skbuff_fclone_cache = kmem_cache_create("skbuff_fclone_cache",
						(2*sizeof(struct sk_buff)) +
						sizeof(atomic_t),
						0,
						SLAB_HWCACHE_ALIGN,
						SLAB_HWCACHE_ALIGN|SLAB_PANIC,
						NULL, NULL);
	if (!skbuff_fclone_cache)
		panic("cannot create skbuff cache");
}

EXPORT_SYMBOL(___pskb_trim);
+3 −8
Original line number Diff line number Diff line
@@ -1781,14 +1781,9 @@ void __init dn_route_init(void)
{
	int i, goal, order;

	dn_dst_ops.kmem_cachep = kmem_cache_create("dn_dst_cache",
						   sizeof(struct dn_route),
						   0, SLAB_HWCACHE_ALIGN,
						   NULL, NULL);

	if (!dn_dst_ops.kmem_cachep)
		panic("DECnet: Failed to allocate dn_dst_cache\n");

	dn_dst_ops.kmem_cachep =
		kmem_cache_create("dn_dst_cache", sizeof(struct dn_route), 0,
				  SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL);
	init_timer(&dn_route_timer);
	dn_route_timer.function = dn_dst_check_expire;
	dn_route_timer.expires = jiffies + decnet_dst_gc_interval * HZ;
+1 −4
Original line number Diff line number Diff line
@@ -126,12 +126,9 @@ void __init inet_initpeers(void)

	peer_cachep = kmem_cache_create("inet_peer_cache",
			sizeof(struct inet_peer),
			0, SLAB_HWCACHE_ALIGN,
			0, SLAB_HWCACHE_ALIGN|SLAB_PANIC,
			NULL, NULL);

	if (!peer_cachep)
		panic("cannot create inet_peer_cache");

	/* All the timers, started at system startup tend
	   to synchronize. Perturb it a bit.
	 */
Loading