]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/proc/array.c
Merge branch 'for-linus' of git://selinuxproject.org/~jmorris/linux-security
[mirror_ubuntu-artful-kernel.git] / fs / proc / array.c
index ddffd7a88b975b303dead614f713ab58a7fe4ef9..c602b8d20f06bf3aa09d97b6114b005671776582 100644 (file)
@@ -394,8 +394,8 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
 
        sigemptyset(&sigign);
        sigemptyset(&sigcatch);
-       cutime = cstime = utime = stime = cputime_zero;
-       cgtime = gtime = cputime_zero;
+       cutime = cstime = utime = stime = 0;
+       cgtime = gtime = 0;
 
        if (lock_task_sighand(task, &flags)) {
                struct signal_struct *sig = task->signal;
@@ -423,14 +423,14 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
                        do {
                                min_flt += t->min_flt;
                                maj_flt += t->maj_flt;
-                               gtime = cputime_add(gtime, t->gtime);
+                               gtime += t->gtime;
                                t = next_thread(t);
                        } while (t != task);
 
                        min_flt += sig->min_flt;
                        maj_flt += sig->maj_flt;
                        thread_group_times(task, &utime, &stime);
-                       gtime = cputime_add(gtime, sig->gtime);
+                       gtime += sig->gtime;
                }
 
                sid = task_session_nr_ns(task, ns);
@@ -464,7 +464,7 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
 
        seq_printf(m, "%d (%s) %c %d %d %d %d %d %u %lu \
 %lu %lu %lu %lu %lu %ld %ld %ld %ld %d 0 %llu %lu %ld %lu %lu %lu %lu %lu \
-%lu %lu %lu %lu %lu %lu %lu %lu %d %d %u %u %llu %lu %ld\n",
+%lu %lu %lu %lu %lu %lu %lu %lu %d %d %u %u %llu %lu %ld %lu %lu %lu\n",
                pid_nr_ns(pid, ns),
                tcomm,
                state,
@@ -511,7 +511,10 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns,
                task->policy,
                (unsigned long long)delayacct_blkio_ticks(task),
                cputime_to_clock_t(gtime),
-               cputime_to_clock_t(cgtime));
+               cputime_to_clock_t(cgtime),
+               (mm && permitted) ? mm->start_data : 0,
+               (mm && permitted) ? mm->end_data : 0,
+               (mm && permitted) ? mm->start_brk : 0);
        if (mm)
                mmput(mm);
        return 0;