]> git.baikalelectronics.ru Git - kernel.git/commit
pid namespaces: make proc have multiple superblocks - one for each namespace
authorPavel Emelyanov <xemul@openvz.org>
Fri, 19 Oct 2007 06:40:08 +0000 (23:40 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 19 Oct 2007 18:53:39 +0000 (11:53 -0700)
commit04e7e22ec1603ab89dc648e44e96f3c8ddba6004
tree3e0d78f869114e5a6e2629fc157ee8f9023316bd
parent4e931c24bd05cc690ad243c529a2f681c142b831
pid namespaces: make proc have multiple superblocks - one for each namespace

Each pid namespace have to be visible through its own proc mount.  Thus we
need to have per-namespace proc trees with their own superblocks.

We cannot easily show different pid namespace via one global proc tree, since
each pid refers to different tasks in different namespaces.  E.g.  pid 1
refers to the init task in the initial namespace and to some other task when
seeing from another namespace.  Moreover - pid, exisintg in one namespace may
not exist in the other.

This approach has one move advantage is that the tasks from the init namespace
can see what tasks live in another namespace by reading entries from another
proc tree.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Sukadev Bhattiprolu <sukadev@us.ibm.com>
Cc: Paul Menage <menage@google.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/proc/inode.c
fs/proc/root.c
include/linux/pid_namespace.h
include/linux/proc_fs.h