]> git.baikalelectronics.ru Git - kernel.git/commit
pid namespaces: make alloc_pid(), free_pid() and put_pid() work with struct upid
authorPavel Emelyanov <xemul@openvz.org>
Fri, 19 Oct 2007 06:40:05 +0000 (23:40 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 19 Oct 2007 18:53:39 +0000 (11:53 -0700)
commit1ec0e4c1f8d0f2f26d55a0c648ddd1775a382211
tree296a61f66daa8ac42b3d77a53d06a97eb71155c9
parent9b2c49760a9ac31e2cbf7666502e5b48d8eba5ed
pid namespaces: make alloc_pid(), free_pid() and put_pid() work with struct upid

Each struct upid element of struct pid has to be initialized properly, i.e.
its nr mst be allocated from appropriate pidmap and ns set to appropriate
namespace.

When allocating a new pid, we need to know the namespace this pid will live
in, so the additional argument is added to alloc_pid().

On the other hand, the rest of the kernel still uses the pid->nr and
pid->pid_chain fields, so these ones are still initialized, but this will be
removed soon.

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>
include/linux/pid.h
kernel/fork.c
kernel/pid.c