]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/init_task.h
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6-omap-h63xx.git] / include / linux / init_task.h
index 45170b2fa2535ce7748a7caa157e8783a0ea3c65..cab741c2d6033ad937b761852def3fbbf60b763b 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/lockdep.h>
 #include <linux/ipc.h>
 #include <linux/pid_namespace.h>
+#include <linux/user_namespace.h>
 
 #define INIT_FDTABLE \
 {                                                      \
@@ -65,9 +66,9 @@
        .posix_timers    = LIST_HEAD_INIT(sig.posix_timers),            \
        .cpu_timers     = INIT_CPU_TIMERS(sig.cpu_timers),              \
        .rlim           = INIT_RLIMITS,                                 \
-       .pgrp           = 1,                                            \
+       .pgrp           = 0,                                            \
        .tty_old_pgrp   = NULL,                                         \
-       { .__session      = 1},                                         \
+       { .__session      = 0},                                         \
 }
 
 extern struct nsproxy init_nsproxy;
@@ -78,16 +79,40 @@ extern struct nsproxy init_nsproxy;
        .uts_ns         = &init_uts_ns,                                 \
        .mnt_ns         = NULL,                                         \
        INIT_IPC_NS(ipc_ns)                                             \
+       .user_ns        = &init_user_ns,                                \
 }
 
 #define INIT_SIGHAND(sighand) {                                                \
        .count          = ATOMIC_INIT(1),                               \
        .action         = { { { .sa_handler = NULL, } }, },             \
        .siglock        = __SPIN_LOCK_UNLOCKED(sighand.siglock),        \
+       .signalfd_list  = LIST_HEAD_INIT(sighand.signalfd_list),        \
 }
 
 extern struct group_info init_groups;
 
+#define INIT_STRUCT_PID {                                              \
+       .count          = ATOMIC_INIT(1),                               \
+       .nr             = 0,                                            \
+       /* Don't put this struct pid in pid_hash */                     \
+       .pid_chain      = { .next = NULL, .pprev = NULL },              \
+       .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,                                \
+}
+
+#define INIT_PID_LINK(type)                                    \
+{                                                              \
+       .node = {                                               \
+               .next = NULL,                                   \
+               .pprev = &init_struct_pid.tasks[type].first,    \
+       },                                                      \
+       .pid = &init_struct_pid,                                \
+}
+
 /*
  *  INIT_TASK is used to set up the first task table, touch at
  * your own risk!. Base=0, limit=0x1fffff (=2MB)
@@ -139,6 +164,11 @@ extern struct group_info init_groups;
        .cpu_timers     = INIT_CPU_TIMERS(tsk.cpu_timers),              \
        .fs_excl        = ATOMIC_INIT(0),                               \
        .pi_lock        = __SPIN_LOCK_UNLOCKED(tsk.pi_lock),            \
+       .pids = {                                                       \
+               [PIDTYPE_PID]  = INIT_PID_LINK(PIDTYPE_PID),            \
+               [PIDTYPE_PGID] = INIT_PID_LINK(PIDTYPE_PGID),           \
+               [PIDTYPE_SID]  = INIT_PID_LINK(PIDTYPE_SID),            \
+       },                                                              \
        INIT_TRACE_IRQFLAGS                                             \
        INIT_LOCKDEP                                                    \
 }