linux/drivers/tty
Alan Cox d155255a34 tty: Fix race in tty release
Ian Abbott found that the tty layer would explode with the right set of
parallel open and close operations. This is because we race in the
handling of tty->drivers->termios[].

Correct this by
	Making tty_ldisc_release behave like nromal code (takes the lock,
			does stuff, drops the lock)
	Drop the tty lock earlier in tty_ldisc_release
	Taking the tty mutex around the driver->termios update in all cases
	Adding a WARN_ON to catch future screwups.

I also forgot to clean up the pty resources properly. With a pty pair we
need to pull both halves out of the tables.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Tested-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-27 11:55:59 -07:00
..
hvc tty: move the termios object into the tty 2012-07-16 13:00:41 -07:00
ipwireless TTY: ipwireless, use tty from tty_port 2012-04-09 11:30:39 -07:00
serial pch_uart: Fix parity setting issue 2012-07-17 09:27:31 -07:00
vt tty: Move the handling of the tty release logic 2012-07-17 09:13:38 -07:00
amiserial.c tty: move the termios object into the tty 2012-07-16 13:00:41 -07:00
bfin_jtag_comm.c TTY: bfin_jtag_comm, use tty from tty_port 2012-04-09 11:28:18 -07:00
cyclades.c tty: move the termios object into the tty 2012-07-16 13:00:41 -07:00
ehv_bytechan.c TTY: remove re-assignments to tty_driver members 2012-03-08 11:37:58 -08:00
isicom.c tty: move the termios object into the tty 2012-07-16 13:00:41 -07:00
Kconfig tty/powerpc: early udbg consoles can't be modules 2012-02-24 16:11:50 -08:00
Makefile
moxa.c tty: move the termios object into the tty 2012-07-16 13:00:41 -07:00
moxa.h
mxser.c tty: move the termios object into the tty 2012-07-16 13:00:41 -07:00
mxser.h
n_gsm.c tty: move the termios object into the tty 2012-07-16 13:00:41 -07:00
n_hdlc.c Remove all #inclusions of asm/system.h 2012-03-28 18:30:03 +01:00
n_r3964.c tty: revert incorrectly applied lock patch 2012-07-16 12:58:12 -07:00
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c tty: move the termios object into the tty 2012-07-16 13:00:41 -07:00
nozomi.c TTY: remove re-assignments to tty_driver members 2012-03-08 11:37:58 -08:00
pty.c tty: Fix race in tty release 2012-07-27 11:55:59 -07:00
rocket_int.h
rocket.c tty: move the termios object into the tty 2012-07-16 13:00:41 -07:00
rocket.h
synclink_gt.c tty: move the termios object into the tty 2012-07-16 13:00:41 -07:00
synclink.c tty: move the termios object into the tty 2012-07-16 13:00:41 -07:00
synclinkmp.c tty: move the termios object into the tty 2012-07-16 13:00:41 -07:00
sysrq.c sysrq: use SEND_SIG_FORCED instead of force_sig() 2012-04-05 15:25:50 -07:00
tty_audit.c
tty_buffer.c tty: hold lock across tty buffer finding and buffer filling 2012-04-09 12:12:45 -07:00
tty_io.c tty: Fix race in tty release 2012-07-27 11:55:59 -07:00
tty_ioctl.c tty: Fix up PPC fallout from the termios move 2012-07-17 09:10:55 -07:00
tty_ldisc.c tty: Fix race in tty release 2012-07-27 11:55:59 -07:00
tty_mutex.c tty: revert incorrectly applied lock patch 2012-07-16 12:58:12 -07:00
tty_port.c tty: move the termios object into the tty 2012-07-16 13:00:41 -07:00