aboutsummaryrefslogtreecommitdiff
path: root/kernel/pid.c
diff options
context:
space:
mode:
authorAndrew Lehmer <alehmer@google.com>2017-09-28 15:28:11 -0700
committerAndrew Lehmer <alehmer@google.com>2017-09-28 15:28:25 -0700
commit0fdd4faef3aa46beb89c8a03be3ae1da42d61346 (patch)
treed44b7edd7efceeafecafca43a5c21d4c88a41896 /kernel/pid.c
parent8ac3b7cbf14fa5d328213b1592efce6ae16f1167 (diff)
parentf2807be44c420478c7afc7cc296217521d5e623c (diff)
Merge branch 'android-x86_64-fugu-3.10-nyc-mr1' into android-x86_64-fugu-3.10-ocHEADo8.0
November 2017.1 Bug: 65558954 Change-Id: I3ccc21349b7ac04252c274663a04317a27597cb1 Signed-off-by: Andrew Lehmer <alehmer@google.com>
Diffstat (limited to 'kernel/pid.c')
-rw-r--r--kernel/pid.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/kernel/pid.c b/kernel/pid.c
index 0eb6d8e8b1d..1d6400df0c4 100644
--- a/kernel/pid.c
+++ b/kernel/pid.c
@@ -519,8 +519,11 @@ pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type,
if (!ns)
ns = task_active_pid_ns(current);
if (likely(pid_alive(task))) {
- if (type != PIDTYPE_PID)
+ if (type != PIDTYPE_PID) {
+ if (type == __PIDTYPE_TGID)
+ type = PIDTYPE_PID;
task = task->group_leader;
+ }
nr = pid_nr_ns(task->pids[type].pid, ns);
}
rcu_read_unlock();
@@ -529,12 +532,6 @@ pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type,
}
EXPORT_SYMBOL(__task_pid_nr_ns);
-pid_t task_tgid_nr_ns(struct task_struct *tsk, struct pid_namespace *ns)
-{
- return pid_nr_ns(task_tgid(tsk), ns);
-}
-EXPORT_SYMBOL(task_tgid_nr_ns);
-
struct pid_namespace *task_active_pid_ns(struct task_struct *tsk)
{
return ns_of_pid(task_pid(tsk));