tty: Fix timeout on pty set ldisc
authorPeter Hurley <peter@hurleysoftware.com>
Wed, 5 Nov 2014 17:13:08 +0000 (12:13 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Nov 2014 02:50:43 +0000 (18:50 -0800)
commit276a661a4d75258b3aa28701b0748f99b773563b
tree68edfa81953d76731eadea638772a1b3c0f7dd94
parentfae76e9adfa450f4c2dd5773265eb3c811a9c484
tty: Fix timeout on pty set ldisc

When changing the ldisc on one end of a pty pair, there may be
waiting readers/writers on the other end which may not exit from
the ldisc i/o loop, preventing tty_ldisc_lock_pair_timeout() from
acquiring the other side's ldisc lock.

Only acquire this side's ldisc lock; although this will no longer
prevent the other side from writing new input, that input will not
be processed until after the ldisc change completes. This has no
effect on normal ttys; new input from the driver was never disabled.

Remove tty_ldisc_enable_pair().

Reviewed-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_ldisc.c