git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cgroup: fix root_count when mount fails due to busy subsystem
[safe/jmp/linux-2.6]
/
kernel
/
pid_namespace.c
diff --git
a/kernel/pid_namespace.c
b/kernel/pid_namespace.c
index
5ca37fa
..
fab8ea8
100644
(file)
--- a/
kernel/pid_namespace.c
+++ b/
kernel/pid_namespace.c
@@
-12,6
+12,7
@@
#include <linux/pid_namespace.h>
#include <linux/syscalls.h>
#include <linux/err.h>
#include <linux/pid_namespace.h>
#include <linux/syscalls.h>
#include <linux/err.h>
+#include <linux/acct.h>
#define BITS_PER_PAGE (PAGE_SIZE*8)
#define BITS_PER_PAGE (PAGE_SIZE*8)
@@
-66,12
+67,12
@@
err_alloc:
return NULL;
}
return NULL;
}
-static struct pid_namespace *create_pid_namespace(int level)
+static struct pid_namespace *create_pid_namespace(
unsigned
int level)
{
struct pid_namespace *ns;
int i;
{
struct pid_namespace *ns;
int i;
- ns = kmem_cache_alloc(pid_ns_cachep, GFP_KERNEL);
+ ns = kmem_cache_
z
alloc(pid_ns_cachep, GFP_KERNEL);
if (ns == NULL)
goto out;
if (ns == NULL)
goto out;
@@
-84,17
+85,13
@@
static struct pid_namespace *create_pid_namespace(int level)
goto out_free_map;
kref_init(&ns->kref);
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);
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);
atomic_set(&ns->pidmap[i].nr_free, BITS_PER_PAGE);
- }
return ns;
return ns;
@@
-182,9
+179,7
@@
void zap_pid_ns_processes(struct pid_namespace *pid_ns)
rc = sys_wait4(-1, NULL, __WALL, NULL);
} while (rc != -ECHILD);
rc = sys_wait4(-1, NULL, __WALL, NULL);
} while (rc != -ECHILD);
-
- /* Child reaper for the pid namespace is going away */
- pid_ns->child_reaper = NULL;
+ acct_exit_ns(pid_ns);
return;
}
return;
}