summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/tty_io.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c
index ac937f767f2..abfe24d28c5 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -1496,7 +1496,6 @@ void disassociate_ctty(int on_exit)
{
struct tty_struct *tty;
int tty_pgrp = -1;
- int session;
lock_kernel();
@@ -1530,7 +1529,6 @@ void disassociate_ctty(int on_exit)
spin_lock_irq(&current->sighand->siglock);
current->signal->tty_old_pgrp = 0;
- session = process_session(current);
spin_unlock_irq(&current->sighand->siglock);
mutex_lock(&tty_mutex);
@@ -1549,7 +1547,7 @@ void disassociate_ctty(int on_exit)
/* Now clear signal->tty under the lock */
read_lock(&tasklist_lock);
- session_clear_tty(session);
+ session_clear_tty(process_session(current));
read_unlock(&tasklist_lock);
unlock_kernel();
}