aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-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 ac937f767f23..abfe24d28c51 100644
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -1496,7 +1496,6 @@ void disassociate_ctty(int on_exit)
1496{ 1496{
1497 struct tty_struct *tty; 1497 struct tty_struct *tty;
1498 int tty_pgrp = -1; 1498 int tty_pgrp = -1;
1499 int session;
1500 1499
1501 lock_kernel(); 1500 lock_kernel();
1502 1501
@@ -1530,7 +1529,6 @@ void disassociate_ctty(int on_exit)
1530 1529
1531 spin_lock_irq(&current->sighand->siglock); 1530 spin_lock_irq(&current->sighand->siglock);
1532 current->signal->tty_old_pgrp = 0; 1531 current->signal->tty_old_pgrp = 0;
1533 session = process_session(current);
1534 spin_unlock_irq(&current->sighand->siglock); 1532 spin_unlock_irq(&current->sighand->siglock);
1535 1533
1536 mutex_lock(&tty_mutex); 1534 mutex_lock(&tty_mutex);
@@ -1549,7 +1547,7 @@ void disassociate_ctty(int on_exit)
1549 1547
1550 /* Now clear signal->tty under the lock */ 1548 /* Now clear signal->tty under the lock */
1551 read_lock(&tasklist_lock); 1549 read_lock(&tasklist_lock);
1552 session_clear_tty(session); 1550 session_clear_tty(process_session(current));
1553 read_unlock(&tasklist_lock); 1551 read_unlock(&tasklist_lock);
1554 unlock_kernel(); 1552 unlock_kernel();
1555} 1553}