linux-stable/drivers/tty
Peter Hurley f9e053dcfc tty: Serialize tty flow control changes with flow_lock
Without serialization, the flow control state can become inverted
wrt. the actual hardware state. For example,

CPU 0                          | CPU 1
stop_tty()                     |
  lock ctrl_lock               |
  tty->stopped = 1             |
  unlock ctrl_lock             |
                               | start_tty()
                               |   lock ctrl_lock
                               |   tty->stopped = 0
                               |   unlock ctrl_lock
                               |   driver->start()
  driver->stop()               |

In this case, the flow control state now indicates the tty has
been started, but the actual hardware state has actually been stopped.

Introduce tty->flow_lock spinlock to serialize tty flow control changes.
Split out unlocked __start_tty()/__stop_tty() flavors for use by
ioctl(TCXONC) in follow-on patch.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-23 21:19:35 -07:00
..
hvc tty: Update hypervisor tty drivers to use core stdout parsing code. 2014-06-26 17:12:23 +01:00
ipwireless tty: ipwireless: Remove tty->closing abort from ipw_open() 2014-07-10 16:06:49 -07:00
serial serial: core: Use spin_lock_irq() in uart_set_termios() 2014-09-23 21:19:35 -07:00
vt tty/vt/keyboard: Resolve many shadow warnings 2014-09-08 16:30:43 -07:00
amiserial.c
bfin_jtag_comm.c
cyclades.c tty: Remove tty_hung_up_p() tests from tty drivers' open() 2014-07-10 16:06:49 -07:00
ehv_bytechan.c tty: Update hypervisor tty drivers to use core stdout parsing code. 2014-06-26 17:12:23 +01:00
goldfish.c goldfish: clean up the checkpatch warnings 2014-05-15 13:20:42 -07:00
isicom.c
Kconfig
Makefile
metag_da.c
moxa.c TTY: fix decimal printf format specifiers prefixed with 0x 2014-09-08 15:51:35 -07:00
moxa.h
mxser.c
mxser.h
n_gsm.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-08-06 09:38:14 -07:00
n_hdlc.c drivers/tty/n_hdlc.c: replace kmalloc/memset by kzalloc 2014-05-28 13:33:18 -07:00
n_r3964.c
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c tty: Fix spurious poll() wakeups 2014-09-08 15:55:25 -07:00
nozomi.c drivers/tty/nozomi.c: Use 'nozomi_setup_memory' instead of 'setup_memory' 2014-09-08 16:09:23 -07:00
pty.c drivers: tty: Fix use-after-free in pty_common_install 2014-07-12 17:21:47 -07:00
rocket.c
rocket.h
rocket_int.h
synclink.c tty: Remove tty_hung_up_p() tests from tty drivers' open() 2014-07-10 16:06:49 -07:00
synclink_gt.c synclink_gt: use pci_zalloc_consistent 2014-08-08 15:57:30 -07:00
synclinkmp.c tty: Remove tty_hung_up_p() tests from tty drivers' open() 2014-07-10 16:06:49 -07:00
sysrq.c mm, oom: ensure memoryless node zonelist always includes zones 2014-08-06 18:01:21 -07:00
tty_audit.c
tty_buffer.c Staging: speakup: Update __speakup_paste_selection() tty (ab)usage to match vt 2014-05-24 02:25:11 +09:00
tty_io.c tty: Serialize tty flow control changes with flow_lock 2014-09-23 21:19:35 -07:00
tty_ioctl.c tty: fix typo in comment of tty_termios_encode_baud_rate 2014-09-08 15:32:05 -07:00
tty_ldisc.c
tty_ldsem.c
tty_mutex.c
tty_port.c tty: Remove tty_hung_up_p() tests from tty drivers' open() 2014-07-10 16:06:49 -07:00