From 11dbf203922dc70a340417c895c95fb96f6b7068 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 18 Jun 2010 14:58:07 +0200 Subject: [PATCH] tty: avoid recursive BTM in pty_close When the console has been redirected, a hangup of the tty will cause tty_release to be called under the big tty_mutex, which leads to a deadlock because hangup is also called under the BTM. This moves the BTM deeper into the tty_hangup function so we can close the redirected tty without holding the BTM. In case of pty, we now need to drop the BTM before calling tty_vhangup. Signed-off-by: Arnd Bergmann Acked-by: Alan Cox Cc: Tony Luck Cc: Thomas Gleixner Cc: Andrew Morton Cc: John Kacur Cc: Al Viro Cc: Ingo Molnar Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed