diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/pid_namespace.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/pid_namespace.c b/kernel/pid_namespace.c index 98702b4b8851..06331cc1c3f5 100644 --- a/kernel/pid_namespace.c +++ b/kernel/pid_namespace.c | |||
@@ -71,7 +71,7 @@ static struct pid_namespace *create_pid_namespace(unsigned int level) | |||
71 | struct pid_namespace *ns; | 71 | struct pid_namespace *ns; |
72 | int i; | 72 | int i; |
73 | 73 | ||
74 | ns = kmem_cache_alloc(pid_ns_cachep, GFP_KERNEL); | 74 | ns = kmem_cache_zalloc(pid_ns_cachep, GFP_KERNEL); |
75 | if (ns == NULL) | 75 | if (ns == NULL) |
76 | goto out; | 76 | goto out; |
77 | 77 | ||
@@ -84,17 +84,13 @@ static struct pid_namespace *create_pid_namespace(unsigned int level) | |||
84 | goto out_free_map; | 84 | goto out_free_map; |
85 | 85 | ||
86 | kref_init(&ns->kref); | 86 | kref_init(&ns->kref); |
87 | ns->last_pid = 0; | ||
88 | ns->child_reaper = NULL; | ||
89 | ns->level = level; | 87 | ns->level = level; |
90 | 88 | ||
91 | set_bit(0, ns->pidmap[0].page); | 89 | set_bit(0, ns->pidmap[0].page); |
92 | atomic_set(&ns->pidmap[0].nr_free, BITS_PER_PAGE - 1); | 90 | atomic_set(&ns->pidmap[0].nr_free, BITS_PER_PAGE - 1); |
93 | 91 | ||
94 | for (i = 1; i < PIDMAP_ENTRIES; i++) { | 92 | for (i = 1; i < PIDMAP_ENTRIES; i++) |
95 | ns->pidmap[i].page = NULL; | ||
96 | atomic_set(&ns->pidmap[i].nr_free, BITS_PER_PAGE); | 93 | atomic_set(&ns->pidmap[i].nr_free, BITS_PER_PAGE); |
97 | } | ||
98 | 94 | ||
99 | return ns; | 95 | return ns; |
100 | 96 | ||