• Peter Hurley's avatar
    tty: Fix timeout on pty set ldisc · 276a661a
    Peter Hurley authored
    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: default avatarAlan Cox <alan@linux.intel.com>
    Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    276a661a
tty_ldisc.c 19.2 KB