diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-07-28 15:07:54 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-07-28 15:07:54 +0200 |
| commit | a403e45c3b678211ee3b7225dbb924921fb5ddd3 (patch) | |
| tree | 6526d8d3c46f2443c7836bf094366179a57e7aad /fs/proc/array.c | |
| parent | a05d2ebab28011c2f3f520833f4bfdd2fd1b9c02 (diff) | |
| parent | d974ae379a2fbe8948f01eabbc6b19c0a80f09bc (diff) | |
Merge core/lib: pick up memparse() change.
Merge branch 'core/lib' into x86/xen
Diffstat (limited to 'fs/proc/array.c')
| -rw-r--r-- | fs/proc/array.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c index 797d775e035..0d6eb33597c 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -80,6 +80,7 @@ #include <linux/delayacct.h> #include <linux/seq_file.h> #include <linux/pid_namespace.h> +#include <linux/tracehook.h> #include <asm/pgtable.h> #include <asm/processor.h> @@ -168,8 +169,12 @@ static inline void task_state(struct seq_file *m, struct pid_namespace *ns, rcu_read_lock(); ppid = pid_alive(p) ? task_tgid_nr_ns(rcu_dereference(p->real_parent), ns) : 0; - tpid = pid_alive(p) && p->ptrace ? - task_pid_nr_ns(rcu_dereference(p->parent), ns) : 0; + tpid = 0; + if (pid_alive(p)) { + struct task_struct *tracer = tracehook_tracer_task(p); + if (tracer) + tpid = task_pid_nr_ns(tracer, ns); + } seq_printf(m, "State:\t%s\n" "Tgid:\t%d\n" |
