diff options
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/net_namespace.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index 0e0ca6d06fa5..6f71db8c4428 100644 --- a/net/core/net_namespace.c +++ b/net/core/net_namespace.c | |||
@@ -24,7 +24,7 @@ EXPORT_SYMBOL_GPL(init_net); | |||
24 | 24 | ||
25 | static struct net *net_alloc(void) | 25 | static struct net *net_alloc(void) |
26 | { | 26 | { |
27 | return kmem_cache_alloc(net_cachep, GFP_KERNEL); | 27 | return kmem_cache_zalloc(net_cachep, GFP_KERNEL); |
28 | } | 28 | } |
29 | 29 | ||
30 | static void net_free(struct net *net) | 30 | static void net_free(struct net *net) |
@@ -90,7 +90,6 @@ static int setup_net(struct net *net) | |||
90 | struct pernet_operations *ops; | 90 | struct pernet_operations *ops; |
91 | int error; | 91 | int error; |
92 | 92 | ||
93 | memset(net, 0, sizeof(struct net)); | ||
94 | atomic_set(&net->count, 1); | 93 | atomic_set(&net->count, 1); |
95 | atomic_set(&net->use_count, 0); | 94 | atomic_set(&net->use_count, 0); |
96 | 95 | ||