diff options
author | Paul Mackerras <paulus@samba.org> | 2007-04-12 13:50:03 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-04-12 13:50:03 -0400 |
commit | e049d1ca3094f3d1d94617f456a9961202f96e3a (patch) | |
tree | a30397ad22f2fbea268bd28fa69c60aad9dfa62a /drivers/char/tty_io.c | |
parent | edfac96a92b88d3b0b53e3f8231b74beee9ecd1d (diff) | |
parent | 80584ff3b99c36ead7e130e453b3a48b18072d18 (diff) |
Merge branch 'linux-2.6' into for-2.6.22
Diffstat (limited to 'drivers/char/tty_io.c')
-rw-r--r-- | drivers/char/tty_io.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index e45326856680..7a32df594907 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
@@ -1376,6 +1376,8 @@ static void do_tty_hangup(struct work_struct *work) | |||
1376 | read_unlock(&tasklist_lock); | 1376 | read_unlock(&tasklist_lock); |
1377 | 1377 | ||
1378 | tty->flags = 0; | 1378 | tty->flags = 0; |
1379 | put_pid(tty->session); | ||
1380 | put_pid(tty->pgrp); | ||
1379 | tty->session = NULL; | 1381 | tty->session = NULL; |
1380 | tty->pgrp = NULL; | 1382 | tty->pgrp = NULL; |
1381 | tty->ctrl_status = 0; | 1383 | tty->ctrl_status = 0; |
@@ -3841,6 +3843,9 @@ static struct pid *__proc_set_tty(struct task_struct *tsk, struct tty_struct *tt | |||
3841 | { | 3843 | { |
3842 | struct pid *old_pgrp; | 3844 | struct pid *old_pgrp; |
3843 | if (tty) { | 3845 | if (tty) { |
3846 | /* We should not have a session or pgrp to here but.... */ | ||
3847 | put_pid(tty->session); | ||
3848 | put_pid(tty->pgrp); | ||
3844 | tty->session = get_pid(task_session(tsk)); | 3849 | tty->session = get_pid(task_session(tsk)); |
3845 | tty->pgrp = get_pid(task_pgrp(tsk)); | 3850 | tty->pgrp = get_pid(task_pgrp(tsk)); |
3846 | } | 3851 | } |