From 4c3f2ead5a3dff9069a45560ba4d007c8ae2e2ee Mon Sep 17 00:00:00 2001 From: Sukadev Bhattiprolu Date: Thu, 18 Oct 2007 23:40:03 -0700 Subject: pid namespaces: introduce struct upid Since task will be visible from different pid namespaces each of them have to be addressed by multiple pids. struct upid is to store the information about which id refers to which namespace. The constuciton looks like this. Each struct pid carried the reference counter and the list of tasks attached to this pid. At its end it has a variable length array of struct upid-s. Each struct upid has a numerical id (pid itself), pointer to the namespace, this ID is valid in and is hashed into a pid_hash for searching the pids. The nr and pid_chain fields are kept in struct pid for a while to make kernel still work (no patch initialize the upids yet), but it will be removed at the end of this series when we switch to upids completely. Signed-off-by: Sukadev Bhattiprolu Signed-off-by: Pavel Emelyanov Cc: Oleg Nesterov Cc: Paul Menage Cc: "Eric W. Biederman" Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/init_task.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/linux/init_task.h') diff --git a/include/linux/init_task.h b/include/linux/init_task.h index d4b2f1c76e1..243e287304d 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h @@ -103,6 +103,12 @@ extern struct group_info init_groups; { .first = &init_task.pids[PIDTYPE_SID].node }, \ }, \ .rcu = RCU_HEAD_INIT, \ + .level = 0, \ + .numbers = { { \ + .nr = 0, \ + .ns = &init_pid_ns, \ + .pid_chain = { .next = NULL, .pprev = NULL }, \ + }, } \ } #define INIT_PID_LINK(type) \ -- cgit v1.2.3