aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/filesystems/proc.txt5
-rw-r--r--fs/proc/array.c20
2 files changed, 22 insertions, 3 deletions
diff --git a/Documentation/filesystems/proc.txt b/Documentation/filesystems/proc.txt
index d8d3f9a8e5a3..fb0a6aeb936c 100644
--- a/Documentation/filesystems/proc.txt
+++ b/Documentation/filesystems/proc.txt
@@ -311,6 +311,11 @@ Table 1-4: Contents of the stat files (as of 2.6.30-rc7)
311 start_data address above which program data+bss is placed 311 start_data address above which program data+bss is placed
312 end_data address below which program data+bss is placed 312 end_data address below which program data+bss is placed
313 start_brk address above which program heap can be expanded with brk() 313 start_brk address above which program heap can be expanded with brk()
314 arg_start address above which program command line is placed
315 arg_end address below which program command line is placed
316 env_start address above which program environment is placed
317 env_end address below which program environment is placed
318 exit_code the thread's exit_code in the form reported by the waitpid system call
314.............................................................................. 319..............................................................................
315 320
316The /proc/PID/maps file containing the currently mapped memory regions and 321The /proc/PID/maps file containing the currently mapped memory regions and
diff --git a/fs/proc/array.c b/fs/proc/array.c
index 62887e39a2de..c1c207c36cae 100644
--- a/fs/proc/array.c
+++ b/fs/proc/array.c
@@ -517,9 +517,23 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
517 seq_put_decimal_ull(m, ' ', delayacct_blkio_ticks(task)); 517 seq_put_decimal_ull(m, ' ', delayacct_blkio_ticks(task));
518 seq_put_decimal_ull(m, ' ', cputime_to_clock_t(gtime)); 518 seq_put_decimal_ull(m, ' ', cputime_to_clock_t(gtime));
519 seq_put_decimal_ll(m, ' ', cputime_to_clock_t(cgtime)); 519 seq_put_decimal_ll(m, ' ', cputime_to_clock_t(cgtime));
520 seq_put_decimal_ull(m, ' ', (mm && permitted) ? mm->start_data : 0); 520
521 seq_put_decimal_ull(m, ' ', (mm && permitted) ? mm->end_data : 0); 521 if (mm && permitted) {
522 seq_put_decimal_ull(m, ' ', (mm && permitted) ? mm->start_brk : 0); 522 seq_put_decimal_ull(m, ' ', mm->start_data);
523 seq_put_decimal_ull(m, ' ', mm->end_data);
524 seq_put_decimal_ull(m, ' ', mm->start_brk);
525 seq_put_decimal_ull(m, ' ', mm->arg_start);
526 seq_put_decimal_ull(m, ' ', mm->arg_end);
527 seq_put_decimal_ull(m, ' ', mm->env_start);
528 seq_put_decimal_ull(m, ' ', mm->env_end);
529 } else
530 seq_printf(m, " 0 0 0 0 0 0 0");
531
532 if (permitted)
533 seq_put_decimal_ll(m, ' ', task->exit_code);
534 else
535 seq_put_decimal_ll(m, ' ', 0);
536
523 seq_putc(m, '\n'); 537 seq_putc(m, '\n');
524 if (mm) 538 if (mm)
525 mmput(mm); 539 mmput(mm);