]> err.no Git - linux-2.6/blobdiff - fs/proc/array.c
Merge branch 'audit.b46' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit...
[linux-2.6] / fs / proc / array.c
index 810eb8fd6500b5d8da81a18157c6eef44b2fe5e7..b380313092bd5e42173af45654e99b5a41aee908 100644 (file)
@@ -141,12 +141,7 @@ static const char *task_state_array[] = {
 
 static inline const char *get_task_state(struct task_struct *tsk)
 {
-       unsigned int state = (tsk->state & (TASK_RUNNING |
-                                           TASK_INTERRUPTIBLE |
-                                           TASK_UNINTERRUPTIBLE |
-                                           TASK_STOPPED |
-                                           TASK_TRACED)) |
-                                          tsk->exit_state;
+       unsigned int state = (tsk->state & TASK_REPORT) | tsk->exit_state;
        const char **p = &task_state_array[0];
 
        while (state) {
@@ -426,7 +421,6 @@ static int do_task_stat(struct task_struct *task, char *buffer, int whole)
        cgtime = gtime = cputime_zero;
 
        rcu_read_lock();
-       ppid = task_tgid_nr_ns(task->real_parent, ns);
        if (lock_task_sighand(task, &flags)) {
                struct signal_struct *sig = task->signal;
 
@@ -465,6 +459,7 @@ static int do_task_stat(struct task_struct *task, char *buffer, int whole)
                }
 
                sid = task_session_nr_ns(task, ns);
+               ppid = task_tgid_nr_ns(task->real_parent, ns);
                pgid = task_pgrp_nr_ns(task, ns);
 
                unlock_task_sighand(task, &flags);