diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/pid.h | 5 | ||||
-rw-r--r-- | include/linux/pid_namespace.h | 6 | ||||
-rw-r--r-- | include/linux/sched.h | 1 |
3 files changed, 9 insertions, 3 deletions
diff --git a/include/linux/pid.h b/include/linux/pid.h index 2c0007d17218..4dec047b1837 100644 --- a/include/linux/pid.h +++ b/include/linux/pid.h | |||
@@ -35,8 +35,9 @@ enum pid_type | |||
35 | * | 35 | * |
36 | * Holding a reference to struct pid solves both of these problems. | 36 | * Holding a reference to struct pid solves both of these problems. |
37 | * It is small so holding a reference does not consume a lot of | 37 | * It is small so holding a reference does not consume a lot of |
38 | * resources, and since a new struct pid is allocated when the numeric | 38 | * resources, and since a new struct pid is allocated when the numeric pid |
39 | * pid value is reused we don't mistakenly refer to new processes. | 39 | * value is reused (when pids wrap around) we don't mistakenly refer to new |
40 | * processes. | ||
40 | */ | 41 | */ |
41 | 42 | ||
42 | struct pid | 43 | struct pid |
diff --git a/include/linux/pid_namespace.h b/include/linux/pid_namespace.h index 76e7c6b2cf33..d2a9d419f01f 100644 --- a/include/linux/pid_namespace.h +++ b/include/linux/pid_namespace.h | |||
@@ -19,6 +19,7 @@ struct pid_namespace { | |||
19 | struct kref kref; | 19 | struct kref kref; |
20 | struct pidmap pidmap[PIDMAP_ENTRIES]; | 20 | struct pidmap pidmap[PIDMAP_ENTRIES]; |
21 | int last_pid; | 21 | int last_pid; |
22 | struct task_struct *child_reaper; | ||
22 | }; | 23 | }; |
23 | 24 | ||
24 | extern struct pid_namespace init_pid_ns; | 25 | extern struct pid_namespace init_pid_ns; |
@@ -36,4 +37,9 @@ static inline void put_pid_ns(struct pid_namespace *ns) | |||
36 | kref_put(&ns->kref, free_pid_ns); | 37 | kref_put(&ns->kref, free_pid_ns); |
37 | } | 38 | } |
38 | 39 | ||
40 | static inline struct task_struct *child_reaper(struct task_struct *tsk) | ||
41 | { | ||
42 | return tsk->nsproxy->pid_ns->child_reaper; | ||
43 | } | ||
44 | |||
39 | #endif /* _LINUX_PID_NS_H */ | 45 | #endif /* _LINUX_PID_NS_H */ |
diff --git a/include/linux/sched.h b/include/linux/sched.h index 6fec1d419714..f0317edea141 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1400,7 +1400,6 @@ extern NORET_TYPE void do_group_exit(int); | |||
1400 | extern void daemonize(const char *, ...); | 1400 | extern void daemonize(const char *, ...); |
1401 | extern int allow_signal(int); | 1401 | extern int allow_signal(int); |
1402 | extern int disallow_signal(int); | 1402 | extern int disallow_signal(int); |
1403 | extern struct task_struct *child_reaper; | ||
1404 | 1403 | ||
1405 | extern int do_execve(char *, char __user * __user *, char __user * __user *, struct pt_regs *); | 1404 | extern int do_execve(char *, char __user * __user *, char __user * __user *, struct pt_regs *); |
1406 | extern long do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int __user *, int __user *); | 1405 | extern long do_fork(unsigned long, unsigned long, struct pt_regs *, unsigned long, int __user *, int __user *); |