* [PATCH] tty: drop the pty lock during hangup
@ 2012-05-09 16:03 Alan Cox
0 siblings, 0 replies; only message in thread
From: Alan Cox @ 2012-05-09 16:03 UTC (permalink / raw)
To: greg, linux-kernel
From: Alan Cox <alan@linux.intel.com>
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>
---
drivers/tty/pty.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index d6fa842..59af394 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);
}
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-05-09 15:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-09 16:03 [PATCH] tty: drop the pty lock during hangup Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®