summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/init_task.h6
-rw-r--r--include/linux/pid.h16
2 files changed, 22 insertions, 0 deletions
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) \
diff --git a/include/linux/pid.h b/include/linux/pid.h
index 1e0e4e3423a..e5865a9c58a 100644
--- a/include/linux/pid.h
+++ b/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;