Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 106017
b: refs/heads/master
c: 84406c1
h: refs/heads/master
i:
  106015: 2f15527
v: v3
  • Loading branch information
Pavel Emelyanov authored and Linus Torvalds committed Jul 25, 2008
1 parent 09972fb commit 30a0d75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 081e4c8a75692c21f3a119a81ca3270081879d0e
refs/heads/master: 84406c153a5bfa5d8b428a0933e9d39db6b59a75
8 changes: 2 additions & 6 deletions trunk/kernel/pid_namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ static struct pid_namespace *create_pid_namespace(unsigned int level)
struct pid_namespace *ns;
int i;

ns = kmem_cache_alloc(pid_ns_cachep, GFP_KERNEL);
ns = kmem_cache_zalloc(pid_ns_cachep, GFP_KERNEL);
if (ns == NULL)
goto out;

Expand All @@ -84,17 +84,13 @@ static struct pid_namespace *create_pid_namespace(unsigned int level)
goto out_free_map;

kref_init(&ns->kref);
ns->last_pid = 0;
ns->child_reaper = NULL;
ns->level = level;

set_bit(0, ns->pidmap[0].page);
atomic_set(&ns->pidmap[0].nr_free, BITS_PER_PAGE - 1);

for (i = 1; i < PIDMAP_ENTRIES; i++) {
ns->pidmap[i].page = NULL;
for (i = 1; i < PIDMAP_ENTRIES; i++)
atomic_set(&ns->pidmap[i].nr_free, BITS_PER_PAGE);
}

return ns;

Expand Down

0 comments on commit 30a0d75

Please sign in to comment.