diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2017-02-08 17:48:18 -0800 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2017-02-08 17:48:17 -0800 |
commit | 0c9dc102d9ad614db425c8dbadbfa81d73964ea6 (patch) | |
tree | d69857e1d7835b9f54443a2e090344053d78774d /include/linux/sched.h | |
parent | 8c3934fc8457a4774a0bb5865c5ecb1fc128e11b (diff) | |
parent | 5cbee2fa5de964083d6d9a2d4898615227393a9d (diff) |
Merge "Use after free from pid_nr_ns()"
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index aca5c5694e09..708c4284b8d9 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -2107,15 +2107,8 @@ static inline pid_t task_tgid_nr(struct task_struct *tsk) return tsk->tgid; } -pid_t task_tgid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns); - -static inline pid_t task_tgid_vnr(struct task_struct *tsk) -{ - return pid_vnr(task_tgid(tsk)); -} - - static inline int pid_alive(const struct task_struct *p); +static inline pid_t task_tgid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns); static inline pid_t task_ppid_nr_ns(const struct task_struct *tsk, struct pid_namespace *ns) { pid_t pid = 0; @@ -2156,6 +2149,16 @@ static inline pid_t task_session_vnr(struct task_struct *tsk) return __task_pid_nr_ns(tsk, PIDTYPE_SID, NULL); } +static inline pid_t task_tgid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns) +{ + return __task_pid_nr_ns(tsk, __PIDTYPE_TGID, ns); +} + +static inline pid_t task_tgid_vnr(struct task_struct *tsk) +{ + return __task_pid_nr_ns(tsk, __PIDTYPE_TGID, NULL); +} + /* obsolete, do not use */ static inline pid_t task_pgrp_nr(struct task_struct *tsk) { |