summaryrefslogtreecommitdiff
path: root/fs/proc/array.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc/array.c')
-rw-r--r--fs/proc/array.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c
index fe14439309ab..995080fd88d2 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -88,10 +88,13 @@ static inline char * task_name(struct task_struct *p, char * buf)
{
int i;
char * name;
+ char tcomm[sizeof(p->comm)];
+
+ get_task_comm(tcomm, p);
ADDBUF(buf, "Name:\t");
- name = p->comm;
- i = sizeof(p->comm);
+ name = tcomm;
+ i = sizeof(tcomm);
do {
unsigned char c = *name;
name++;
@@ -309,6 +312,7 @@ int proc_pid_stat(struct task_struct *task, char * buffer)
int num_threads = 0;
struct mm_struct *mm;
unsigned long long start_time;
+ char tcomm[sizeof(task->comm)];
state = *get_task_state(task);
vsize = eip = esp = 0;
@@ -325,6 +329,7 @@ int proc_pid_stat(struct task_struct *task, char * buffer)
up_read(&mm->mmap_sem);
}
+ get_task_comm(tcomm, task);
wchan = get_wchan(task);
sigemptyset(&sigign);
@@ -362,7 +367,7 @@ int proc_pid_stat(struct task_struct *task, char * buffer)
%lu %lu %lu %lu %lu %ld %ld %ld %ld %d %ld %llu %lu %ld %lu %lu %lu %lu %lu \
%lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu\n",
task->pid,
- task->comm,
+ tcomm,
state,
ppid,
pgid,