From: Alan Cox Date: Thu, 15 Jan 2009 13:30:25 +0000 (+0000) Subject: tty: Fix race in the flush for some ldiscs X-Git-Tag: v2.6.29-rc2~75 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c0253eec2a8e1140dd9672a1efe095cdcf5811d0;p=pandora-kernel.git 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: Alan Cox Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed