aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pid_namespace.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/pid_namespace.h')
-rw-r--r--include/linux/pid_namespace.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h
index 65e3e87eacc5..215e5e3dda10 100644
--- a/include/linux/pid_namespace.h
+++ b/include/linux/pid_namespace.h
@@ -21,6 +21,7 @@ struct pid_namespace {
21 struct kref kref; 21 struct kref kref;
22 struct pidmap pidmap[PIDMAP_ENTRIES]; 22 struct pidmap pidmap[PIDMAP_ENTRIES];
23 int last_pid; 23 int last_pid;
24 unsigned int nr_hashed;
24 struct task_struct *child_reaper; 25 struct task_struct *child_reaper;
25 struct kmem_cache *pid_cachep; 26 struct kmem_cache *pid_cachep;
26 unsigned int level; 27 unsigned int level;
@@ -31,13 +32,18 @@ struct pid_namespace {
31#ifdef CONFIG_BSD_PROCESS_ACCT 32#ifdef CONFIG_BSD_PROCESS_ACCT
32 struct bsd_acct_struct *bacct; 33 struct bsd_acct_struct *bacct;
33#endif 34#endif
35 struct user_namespace *user_ns;
36 struct work_struct proc_work;
34 kgid_t pid_gid; 37 kgid_t pid_gid;
35 int hide_pid; 38 int hide_pid;
36 int reboot; /* group exit code if this pidns was rebooted */ 39 int reboot; /* group exit code if this pidns was rebooted */
40 unsigned int proc_inum;
37}; 41};
38 42
39extern struct pid_namespace init_pid_ns; 43extern struct pid_namespace init_pid_ns;
40 44
45#define PIDNS_HASH_ADDING (1U << 31)
46
41#ifdef CONFIG_PID_NS 47#ifdef CONFIG_PID_NS
42static inline struct pid_namespace *get_pid_ns(struct pid_namespace *ns) 48static inline struct pid_namespace *get_pid_ns(struct pid_namespace *ns)
43{ 49{
@@ -46,7 +52,8 @@ static inline struct pid_namespace *get_pid_ns(struct pid_namespace *ns)
46 return ns; 52 return ns;
47} 53}
48 54
49extern struct pid_namespace *copy_pid_ns(unsigned long flags, struct pid_namespace *ns); 55extern struct pid_namespace *copy_pid_ns(unsigned long flags,
56 struct user_namespace *user_ns, struct pid_namespace *ns);
50extern void zap_pid_ns_processes(struct pid_namespace *pid_ns); 57extern void zap_pid_ns_processes(struct pid_namespace *pid_ns);
51extern int reboot_pid_ns(struct pid_namespace *pid_ns, int cmd); 58extern int reboot_pid_ns(struct pid_namespace *pid_ns, int cmd);
52extern void put_pid_ns(struct pid_namespace *ns); 59extern void put_pid_ns(struct pid_namespace *ns);
@@ -59,8 +66,8 @@ static inline struct pid_namespace *get_pid_ns(struct pid_namespace *ns)
59 return ns; 66 return ns;
60} 67}
61 68
62static inline struct pid_namespace * 69static inline struct pid_namespace *copy_pid_ns(unsigned long flags,
63copy_pid_ns(unsigned long flags, struct pid_namespace *ns) 70 struct user_namespace *user_ns, struct pid_namespace *ns)
64{ 71{
65 if (flags & CLONE_NEWPID) 72 if (flags & CLONE_NEWPID)
66 ns = ERR_PTR(-EINVAL); 73 ns = ERR_PTR(-EINVAL);