diff options
-rw-r--r-- | fs/proc/array.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c index 0b615d62a159..c0e554971df0 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c | |||
@@ -347,6 +347,8 @@ static int do_task_stat(struct task_struct *task, char * buffer, int whole) | |||
347 | sigemptyset(&sigign); | 347 | sigemptyset(&sigign); |
348 | sigemptyset(&sigcatch); | 348 | sigemptyset(&sigcatch); |
349 | cutime = cstime = utime = stime = cputime_zero; | 349 | cutime = cstime = utime = stime = cputime_zero; |
350 | |||
351 | mutex_lock(&tty_mutex); | ||
350 | read_lock(&tasklist_lock); | 352 | read_lock(&tasklist_lock); |
351 | if (task->sighand) { | 353 | if (task->sighand) { |
352 | spin_lock_irq(&task->sighand->siglock); | 354 | spin_lock_irq(&task->sighand->siglock); |
@@ -388,6 +390,7 @@ static int do_task_stat(struct task_struct *task, char * buffer, int whole) | |||
388 | } | 390 | } |
389 | ppid = pid_alive(task) ? task->group_leader->real_parent->tgid : 0; | 391 | ppid = pid_alive(task) ? task->group_leader->real_parent->tgid : 0; |
390 | read_unlock(&tasklist_lock); | 392 | read_unlock(&tasklist_lock); |
393 | mutex_unlock(&tty_mutex); | ||
391 | 394 | ||
392 | if (!whole || num_threads<2) | 395 | if (!whole || num_threads<2) |
393 | wchan = get_wchan(task); | 396 | wchan = get_wchan(task); |