diff options
-rw-r--r-- | include/linux/init_task.h | 6 | ||||
-rw-r--r-- | include/linux/pid.h | 16 |
2 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/init_task.h b/include/linux/init_task.h index d4b2f1c76e12..243e287304d0 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h | |||
@@ -103,6 +103,12 @@ extern struct group_info init_groups; | |||
103 | { .first = &init_task.pids[PIDTYPE_SID].node }, \ | 103 | { .first = &init_task.pids[PIDTYPE_SID].node }, \ |
104 | }, \ | 104 | }, \ |
105 | .rcu = RCU_HEAD_INIT, \ | 105 | .rcu = RCU_HEAD_INIT, \ |
106 | .level = 0, \ | ||
107 | .numbers = { { \ | ||
108 | .nr = 0, \ | ||
109 | .ns = &init_pid_ns, \ | ||
110 | .pid_chain = { .next = NULL, .pprev = NULL }, \ | ||
111 | }, } \ | ||
106 | } | 112 | } |
107 | 113 | ||
108 | #define INIT_PID_LINK(type) \ | 114 | #define INIT_PID_LINK(type) \ |
diff --git a/include/linux/pid.h b/include/linux/pid.h index 1e0e4e3423a6..e5865a9c58a6 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h | |||
@@ -40,6 +40,20 @@ enum pid_type | |||
40 | * processes. | 40 | * processes. |
41 | */ | 41 | */ |
42 | 42 | ||
43 | |||
44 | /* | ||
45 | * struct upid is used to get the id of the struct pid, as it is | ||
46 | * seen in particular namespace. Later the struct pid is found with | ||
47 | * find_pid_ns() using the int nr and struct pid_namespace *ns. | ||
48 | */ | ||
49 | |||
50 | struct upid { | ||
51 | /* Try to keep pid_chain in the same cacheline as nr for find_pid */ | ||
52 | int nr; | ||
53 | struct pid_namespace *ns; | ||
54 | struct hlist_node pid_chain; | ||
55 | }; | ||
56 | |||
43 | struct pid | 57 | struct pid |
44 | { | 58 | { |
45 | atomic_t count; | 59 | atomic_t count; |
@@ -49,6 +63,8 @@ struct pid | |||
49 | /* lists of tasks that use this pid */ | 63 | /* lists of tasks that use this pid */ |
50 | struct hlist_head tasks[PIDTYPE_MAX]; | 64 | struct hlist_head tasks[PIDTYPE_MAX]; |
51 | struct rcu_head rcu; | 65 | struct rcu_head rcu; |
66 | int level; | ||
67 | struct upid numbers[1]; | ||
52 | }; | 68 | }; |
53 | 69 | ||
54 | extern struct pid init_struct_pid; | 70 | extern struct pid init_struct_pid; |