aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc')
-rw-r--r--fs/proc/array.c4
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,
429 struct signal_struct *sig = task->signal; 429 struct signal_struct *sig = task->signal;
430 430
431 if (sig->tty) { 431 if (sig->tty) {
432 tty_pgrp = pid_nr_ns(sig->tty->pgrp, ns); 432 struct pid *pgrp = tty_get_pgrp(sig->tty);
433 tty_pgrp = pid_nr_ns(pgrp, ns);
434 put_pid(pgrp);
433 tty_nr = new_encode_dev(tty_devnum(sig->tty)); 435 tty_nr = new_encode_dev(tty_devnum(sig->tty));
434 } 436 }
435 437