From: Arnd Bergmann Date: Fri, 18 Jun 2010 12:58:07 +0000 (+0200) Subject: tty: avoid recursive BTM in pty_close X-Git-Tag: v2.6.36-rc1~294^2~22 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11dbf203922dc70a340417c895c95fb96f6b7068;p=pandora-kernel.git 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-diff-tree failed