diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2006-09-29 02:00:41 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-29 09:18:16 -0700 |
commit | 3cfd0885fac78c130a119ed576d18b5948fa2a5a (patch) | |
tree | 9a49ab330a39fc32cff3208038f1cef7763780aa /fs/proc/array.c | |
parent | 808a0d389ff8d85017ec811085a6083394c02caf (diff) | |
download | kernel_samsung_crespo-3cfd0885fac78c130a119ed576d18b5948fa2a5a.zip kernel_samsung_crespo-3cfd0885fac78c130a119ed576d18b5948fa2a5a.tar.gz kernel_samsung_crespo-3cfd0885fac78c130a119ed576d18b5948fa2a5a.tar.bz2 |
[PATCH] tty: stop the tty vanishing under procfs access
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/proc/array.c')
-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 0b615d6..c0e5549 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) sigemptyset(&sigign); sigemptyset(&sigcatch); cutime = cstime = utime = stime = cputime_zero; + + mutex_lock(&tty_mutex); read_lock(&tasklist_lock); if (task->sighand) { spin_lock_irq(&task->sighand->siglock); @@ -388,6 +390,7 @@ static int do_task_stat(struct task_struct *task, char * buffer, int whole) } ppid = pid_alive(task) ? task->group_leader->real_parent->tgid : 0; read_unlock(&tasklist_lock); + mutex_unlock(&tty_mutex); if (!whole || num_threads<2) wchan = get_wchan(task); |