1
0
Fork 0

tty: drop the pty lock during hangup

In theory we don't need it, in practice we are hitting some ill understood
deadlock when we don't drop it. The old code dropped it here so we are not
undoing anything problematic for pty. If pty could be unloaded it would be
a problem but it can't.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
hifive-unleashed-5.1
Alan Cox 2012-05-09 17:03:19 +01:00 committed by Greg Kroah-Hartman
parent fd11b42e35
commit b1d679afd7
1 changed files with 2 additions and 0 deletions

View File

@ -63,7 +63,9 @@ static void pty_close(struct tty_struct *tty, struct file *filp)
mutex_unlock(&devpts_mutex);
}
#endif
tty_unlock(tty);
tty_vhangup(tty->link);
tty_lock(tty);
}
}