pidns: Capture the user namespace and filter ns_last_pid
authorEric W. Biederman <ebiederm@xmission.com>
Thu, 2 Aug 2012 11:25:10 +0000 (04:25 -0700)
committerEric W. Biederman <ebiederm@xmission.com>
Mon, 19 Nov 2012 13:57:31 +0000 (05:57 -0800)
commit49f4d8b93ccf9454284b6f524b96c66d8d7fbccc
tree06540b59a9d302687fd0519239729c1612d0e2b7
parentae06c7c83fc6e97ba247a261921c101960f3d28f
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>
include/linux/pid_namespace.h
kernel/nsproxy.c
kernel/pid.c
kernel/pid_namespace.c