|
@@ -3032,11 +3032,12 @@ EXPORT_SYMBOL(tty_devnum);
|
|
|
|
|
|
void proc_clear_tty(struct task_struct *p)
|
|
void proc_clear_tty(struct task_struct *p)
|
|
{
|
|
{
|
|
|
|
+ unsigned long flags;
|
|
struct tty_struct *tty;
|
|
struct tty_struct *tty;
|
|
- spin_lock_irq(&p->sighand->siglock);
|
|
|
|
|
|
+ spin_lock_irqsave(&p->sighand->siglock, flags);
|
|
tty = p->signal->tty;
|
|
tty = p->signal->tty;
|
|
p->signal->tty = NULL;
|
|
p->signal->tty = NULL;
|
|
- spin_unlock_irq(&p->sighand->siglock);
|
|
|
|
|
|
+ spin_unlock_irqrestore(&p->sighand->siglock, flags);
|
|
tty_kref_put(tty);
|
|
tty_kref_put(tty);
|
|
}
|
|
}
|
|
|
|
|