diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2008-04-30 00:53:31 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-30 08:29:40 -0700 |
commit | 5d0fdf1e01899805b6c2c0b789a707dcb731b1ea (patch) | |
tree | 19827c7b3cf365c0b403741ead6c7bc317cad51b /fs/proc | |
parent | 575537b3248ee9b7578a3bb3df33fcdda2bfc4d5 (diff) | |
download | linux-5d0fdf1e01899805b6c2c0b789a707dcb731b1ea.tar.bz2 |
tty_io: fix remaining pid struct locking
This fixes the last couple of pid struct locking failures I know about.
[oleg@tv-sign.ru: clean up do_task_stat()]
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/array.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c index b07a71002f2f..c135cbdd9127 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -429,7 +429,9 @@ static int do_task_stat(struct seq_file *m, struct pid_namespace *ns, struct signal_struct *sig = task->signal; if (sig->tty) { - tty_pgrp = pid_nr_ns(sig->tty->pgrp, ns); + struct pid *pgrp = tty_get_pgrp(sig->tty); + tty_pgrp = pid_nr_ns(pgrp, ns); + put_pid(pgrp); tty_nr = new_encode_dev(tty_devnum(sig->tty)); } |