summaryrefslogtreecommitdiffstats
path: root/kernel/pid.c
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2012-08-02 04:25:10 -0700
committerEric W. Biederman <ebiederm@xmission.com>2012-11-19 05:57:31 -0800
commit49f4d8b93ccf9454284b6f524b96c66d8d7fbccc (patch)
tree06540b59a9d302687fd0519239729c1612d0e2b7 /kernel/pid.c
parentae06c7c83fc6e97ba247a261921c101960f3d28f (diff)
downloadlinux-49f4d8b93ccf9454284b6f524b96c66d8d7fbccc.tar.gz
linux-49f4d8b93ccf9454284b6f524b96c66d8d7fbccc.tar.bz2
linux-49f4d8b93ccf9454284b6f524b96c66d8d7fbccc.zip
pidns: Capture the user namespace and filter ns_last_pid
- Capture the the user namespace that creates the pid namespace - Use that user namespace to test if it is ok to write to /proc/sys/kernel/ns_last_pid. Zhao Hongjiang <zhaohongjiang@huawei.com> noticed I was missing a put_user_ns in when destroying a pid_ns. I have foloded his patch into this one so that bisects will work properly. Acked-by: Serge Hallyn <serge.hallyn@canonical.com> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Diffstat (limited to 'kernel/pid.c')
-rw-r--r--kernel/pid.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/pid.c b/kernel/pid.c
index aebd4f5aaf41..2a624f1486e1 100644
--- a/kernel/pid.c
+++ b/kernel/pid.c
@@ -78,6 +78,7 @@ struct pid_namespace init_pid_ns = {
.last_pid = 0,
.level = 0,
.child_reaper = &init_task,
+ .user_ns = &init_user_ns,
};
EXPORT_SYMBOL_GPL(init_pid_ns);