From f2ffb9e46f7d236535b234a14ff83af0803e0493 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Wed, 9 May 2012 17:03:19 +0100 Subject: [PATCH] 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 Signed-off-by: Greg Kroah-Hartman --- drivers/tty/pty.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c index d6fa8429f3ff2..59af3945ea859 100644 --- a/drivers/tty/pty.c +++ b/drivers/tty/pty.c @@ -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); } } -- 2.39.5