aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc/array.c')
-rw-r--r--fs/proc/array.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 65c62e1bfd6f..810eb8fd6500 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -169,7 +169,7 @@ static inline char *task_state(struct task_struct *p, char *buffer)
169 ppid = pid_alive(p) ? 169 ppid = pid_alive(p) ?
170 task_tgid_nr_ns(rcu_dereference(p->real_parent), ns) : 0; 170 task_tgid_nr_ns(rcu_dereference(p->real_parent), ns) : 0;
171 tpid = pid_alive(p) && p->ptrace ? 171 tpid = pid_alive(p) && p->ptrace ?
172 task_ppid_nr_ns(rcu_dereference(p->parent), ns) : 0; 172 task_pid_nr_ns(rcu_dereference(p->parent), ns) : 0;
173 buffer += sprintf(buffer, 173 buffer += sprintf(buffer,
174 "State:\t%s\n" 174 "State:\t%s\n"
175 "Tgid:\t%d\n" 175 "Tgid:\t%d\n"
@@ -426,6 +426,7 @@ static int do_task_stat(struct task_struct *task, char *buffer, int whole)
426 cgtime = gtime = cputime_zero; 426 cgtime = gtime = cputime_zero;
427 427
428 rcu_read_lock(); 428 rcu_read_lock();
429 ppid = task_tgid_nr_ns(task->real_parent, ns);
429 if (lock_task_sighand(task, &flags)) { 430 if (lock_task_sighand(task, &flags)) {
430 struct signal_struct *sig = task->signal; 431 struct signal_struct *sig = task->signal;
431 432
@@ -465,7 +466,6 @@ static int do_task_stat(struct task_struct *task, char *buffer, int whole)
465 466
466 sid = task_session_nr_ns(task, ns); 467 sid = task_session_nr_ns(task, ns);
467 pgid = task_pgrp_nr_ns(task, ns); 468 pgid = task_pgrp_nr_ns(task, ns);
468 ppid = task_ppid_nr_ns(task, ns);
469 469
470 unlock_task_sighand(task, &flags); 470 unlock_task_sighand(task, &flags);
471 } 471 }