aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/pid.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/pid.c')
-rw-r--r--kernel/pid.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/pid.c b/kernel/pid.c
index 2a624f1486e1..3a5f238c1ca0 100644
--- a/kernel/pid.c
+++ b/kernel/pid.c
@@ -345,7 +345,7 @@ EXPORT_SYMBOL_GPL(find_pid_ns);
345 345
346struct pid *find_vpid(int nr) 346struct pid *find_vpid(int nr)
347{ 347{
348 return find_pid_ns(nr, current->nsproxy->pid_ns); 348 return find_pid_ns(nr, task_active_pid_ns(current));
349} 349}
350EXPORT_SYMBOL_GPL(find_vpid); 350EXPORT_SYMBOL_GPL(find_vpid);
351 351
@@ -429,7 +429,7 @@ struct task_struct *find_task_by_pid_ns(pid_t nr, struct pid_namespace *ns)
429 429
430struct task_struct *find_task_by_vpid(pid_t vnr) 430struct task_struct *find_task_by_vpid(pid_t vnr)
431{ 431{
432 return find_task_by_pid_ns(vnr, current->nsproxy->pid_ns); 432 return find_task_by_pid_ns(vnr, task_active_pid_ns(current));
433} 433}
434 434
435struct pid *get_task_pid(struct task_struct *task, enum pid_type type) 435struct pid *get_task_pid(struct task_struct *task, enum pid_type type)
@@ -484,7 +484,7 @@ EXPORT_SYMBOL_GPL(pid_nr_ns);
484 484
485pid_t pid_vnr(struct pid *pid) 485pid_t pid_vnr(struct pid *pid)
486{ 486{
487 return pid_nr_ns(pid, current->nsproxy->pid_ns); 487 return pid_nr_ns(pid, task_active_pid_ns(current));
488} 488}
489EXPORT_SYMBOL_GPL(pid_vnr); 489EXPORT_SYMBOL_GPL(pid_vnr);
490 490
@@ -495,7 +495,7 @@ pid_t __task_pid_nr_ns(struct task_struct *task, enum pid_type type,
495 495
496 rcu_read_lock(); 496 rcu_read_lock();
497 if (!ns) 497 if (!ns)
498 ns = current->nsproxy->pid_ns; 498 ns = task_active_pid_ns(current);
499 if (likely(pid_alive(task))) { 499 if (likely(pid_alive(task))) {
500 if (type != PIDTYPE_PID) 500 if (type != PIDTYPE_PID)
501 task = task->group_leader; 501 task = task->group_leader;