Skip to content
Commit c0253eec authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds
Browse files

tty: Fix race in the flush for some ldiscs



If you issue an ioctl to flush a tty as the line discipline is changing or
otherwise unplugged you can get a crash. The bug is very old but the rest
of the BKL lock dropping and some very "good" luck on Ingo's part caught
an example.

Use the correct ldisc_ref form so that we wait for the ldisc change to
complete and then flush

Signed-off-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5393f780
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment