Virtual pids will have their own meanings of pid numerical ids, so when initializing init_pid we need to split the data referring to the struct pid itself and to the ids of the pid Signed-off-by: Pavel Emelianov <xemul@xxxxxxxxxx> --- init_task.h | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) diff --git a/include/linux/init_task.h b/include/linux/init_task.h index 276ccaa..ef10654 100644 --- a/include/linux/init_task.h +++ b/include/linux/init_task.h @@ -89,17 +89,24 @@ extern struct nsproxy init_nsproxy; extern struct group_info init_groups; -#define INIT_STRUCT_PID { \ - .count = ATOMIC_INIT(1), \ - .nr = 0, \ +#ifndef CONFIG_PID_NS +#define INIT_STRUCT_PID_NRS \ + .nr = 0, \ /* Don't put this struct pid in pid_hash */ \ .pid_chain = { .next = NULL, .pprev = NULL }, \ + +#else +#endif + +#define INIT_STRUCT_PID { \ + .count = ATOMIC_INIT(1), \ .tasks = { \ { .first = &init_task.pids[PIDTYPE_PID].node }, \ { .first = &init_task.pids[PIDTYPE_PGID].node }, \ { .first = &init_task.pids[PIDTYPE_SID].node }, \ }, \ .rcu = RCU_HEAD_INIT, \ + INIT_STRUCT_PID_NRS \ } #define INIT_PID_LINK(type) \ _______________________________________________ Containers mailing list Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linux-foundation.org/mailman/listinfo/containers