|
@@ -878,9 +878,8 @@ void disassociate_ctty(int on_exit)
|
|
spin_lock_irq(¤t->sighand->siglock);
|
|
spin_lock_irq(¤t->sighand->siglock);
|
|
put_pid(current->signal->tty_old_pgrp);
|
|
put_pid(current->signal->tty_old_pgrp);
|
|
current->signal->tty_old_pgrp = NULL;
|
|
current->signal->tty_old_pgrp = NULL;
|
|
- spin_unlock_irq(¤t->sighand->siglock);
|
|
|
|
|
|
|
|
- tty = get_current_tty();
|
|
|
|
|
|
+ tty = tty_kref_get(current->signal->tty);
|
|
if (tty) {
|
|
if (tty) {
|
|
unsigned long flags;
|
|
unsigned long flags;
|
|
spin_lock_irqsave(&tty->ctrl_lock, flags);
|
|
spin_lock_irqsave(&tty->ctrl_lock, flags);
|
|
@@ -897,6 +896,7 @@ void disassociate_ctty(int on_exit)
|
|
#endif
|
|
#endif
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ spin_unlock_irq(¤t->sighand->siglock);
|
|
/* Now clear signal->tty under the lock */
|
|
/* Now clear signal->tty under the lock */
|
|
read_lock(&tasklist_lock);
|
|
read_lock(&tasklist_lock);
|
|
session_clear_tty(task_session(current));
|
|
session_clear_tty(task_session(current));
|