]> git.baikalelectronics.ru Git - kernel.git/commit
tty: fix ldisc lock inversion trace
authorAlan Cox <alan@linux.intel.com>
Tue, 29 May 2012 12:45:16 +0000 (13:45 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 29 May 2012 17:42:13 +0000 (10:42 -0700)
commitb3660aeb466a7ce0bad65bdf195e150ca731f726
tree3c7e3b21dad828aa404ec5e6df5d8006cdb90815
parentc7803fb3f92e4ec19233c0edc21baf71356b601d
tty: fix ldisc lock inversion trace

This is caused by tty_release using tty_lock_pair to lock both sides of
the pty/tty pair, and then tty_ldisc_release dropping and relocking one
side only.  We can drop both fine, so drop both to avoid any lock
ordering concerns.

Rework the release path to fix the new locking model.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/tty/tty_ldisc.c