aboutsummaryrefslogtreecommitdiff
path: root/net/lapb/lapb_subr.c
diff options
context:
space:
mode:
authorDmitry Safonov <[email protected]>2019-01-09 01:17:40 +0000
committerGreg Kroah-Hartman <[email protected]>2019-01-11 17:03:42 +0100
commitd3736d82e8169768218ee0ef68718875918091a0 (patch)
tree0a7ee066b464a7a41104646d07a2513d95e89b76 /net/lapb/lapb_subr.c
parentd3a28a53630e1ca10f59562ef560e3f70785cb09 (diff)
tty: Don't hold ldisc lock in tty_reopen() if ldisc present
Try to get reference for ldisc during tty_reopen(). If ldisc present, we don't need to do tty_ldisc_reinit() and lock the write side for line discipline semaphore. Effectively, it optimizes fast-path for tty_reopen(), but more importantly it won't interrupt ongoing IO on the tty as no ldisc change is needed. Fixes user-visible issue when tty_reopen() interrupted login process for user with a long password, observed and reported by Lukas. Fixes: c96cf923a98d ("tty: Don't block on IO when ldisc change is pending") Fixes: 83d817f41070 ("tty: Hold tty_ldisc_lock() during tty_reopen()") Cc: Jiri Slaby <[email protected]> Reported-by: Lukas F. Hartmann <[email protected]> Tested-by: Lukas F. Hartmann <[email protected]> Cc: stable <[email protected]> Signed-off-by: Dmitry Safonov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'net/lapb/lapb_subr.c')
0 files changed, 0 insertions, 0 deletions