From 3e130656bacc2a9dc13471cabba2eb2feff3483d Mon Sep 17 00:00:00 2001 From: Sukadev Bhattiprolu Date: Thu, 18 Oct 2007 23:40:03 -0700 Subject: [PATCH] --- yaml --- r: 71445 b: refs/heads/master c: 4c3f2ead5a3dff9069a45560ba4d007c8ae2e2ee h: refs/heads/master i: 71443: 2051d9cef384e71f96deada487565efed8414686 v: v3 --- [refs] | 2 +- trunk/include/linux/init_task.h | 6 ++++++ trunk/include/linux/pid.h | 16 ++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 3302c2b8e060..4741fb1d0679 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 60347f6716aa49831ac311e04d77ccdc50dc024a +refs/heads/master: 4c3f2ead5a3dff9069a45560ba4d007c8ae2e2ee diff --git a/trunk/include/linux/init_task.h b/trunk/include/linux/init_task.h index d4b2f1c76e12..243e287304d0 100644 --- a/trunk/include/linux/init_task.h +++ b/trunk/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) \ diff --git a/trunk/include/linux/pid.h b/trunk/include/linux/pid.h index 1e0e4e3423a6..e5865a9c58a6 100644 --- a/trunk/include/linux/pid.h +++ b/trunk/include/linux/pid.h @@ -40,6 +40,20 @@ enum pid_type * processes. */ + +/* + * struct upid is used to get the id of the struct pid, as it is + * seen in particular namespace. Later the struct pid is found with + * find_pid_ns() using the int nr and struct pid_namespace *ns. + */ + +struct upid { + /* Try to keep pid_chain in the same cacheline as nr for find_pid */ + int nr; + struct pid_namespace *ns; + struct hlist_node pid_chain; +}; + struct pid { atomic_t count; @@ -49,6 +63,8 @@ struct pid /* lists of tasks that use this pid */ struct hlist_head tasks[PIDTYPE_MAX]; struct rcu_head rcu; + int level; + struct upid numbers[1]; }; extern struct pid init_struct_pid;