linux-stable/drivers/tty
Peter Hurley c590f6b6cf tty: Document locking for tty_port_block_til_ready()
The tty lock is held when the tty driver's open() method is called
(from tty_open()). The call-tree audit [1] of tty_port_block_til_ready()
is a closed graph of the callers of tty_port_block_til_ready();
ie., all callers originate only from tty_open().

Of these callers, none drop the tty lock.

Also, document tty_port_block_til_ready() may drop and reacquire
the tty lock when blocking, which means the tty or tty_port may have
changed state.

[1]
Call-tree audit of tty_port_block_til_ready()
* does not include call tree of tty_port_open() which is already
  documented in 'tty: Document locking from tty_port_open()'

tty_open()
  tty->ops->open() --+
                     |
        cy_open():drivers/tty/cyclades.c
        rp_open():drivers/tty/rocket.c
        rs_open():drivers/tty/amiserial.c
        moxa_open():drivers/tty/moxa.c
        gsmtty_open():drivers/tty/n_gsm.c
        rs_open():drivers/tty/serial/68328serial.c
        uart_open():drivers/tty/serial/serial_core.c
        isdn_tty_open():drivers/isdn/i4l/isdn_tty.c
        mgslpc_open():drivers/char/pcmcia/synclink_cs.c
                     |
                     +- tty_port_block_til_ready()

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-10 16:05:19 -07:00
..
hvc Merge git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2014-06-11 16:50:01 -07:00
ipwireless tty: Fix low_latency BUG 2014-02-28 16:31:00 -08:00
serial serial: fsl_lpuart: calculate DMA burst 2014-07-10 16:03:59 -07:00
vt Merge tag 'drm-intel-fixes-2014-06-17' of git://anongit.freedesktop.org/drm-intel into drm-next 2014-06-19 10:54:35 +10:00
amiserial.c
bfin_jtag_comm.c
cyclades.c
ehv_bytechan.c
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
moxa.h
mxser.c
mxser.h
n_gsm.c
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: Correct INPCK handling 2014-06-19 13:04:52 -07:00
nozomi.c
pty.c
rocket.c
rocket.h
rocket_int.h
synclink.c synclink: fix info leak in ioctl 2014-03-17 16:13:23 -07:00
synclink_gt.c
synclinkmp.c synclink: fix info leak in ioctl 2014-03-17 16:13:23 -07:00
sysrq.c sysrq,rcu: suppress RCU stall warnings while sysrq runs 2014-06-06 16:08:17 -07:00
tty_audit.c audit: anchor all pid references in the initial pid namespace 2014-03-20 10:11:55 -04:00
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: fix memleak in alloc_pid 2014-04-16 14:31:13 -07:00
tty_ioctl.c
tty_ldisc.c
tty_ldsem.c
tty_mutex.c
tty_port.c tty: Document locking for tty_port_block_til_ready() 2014-07-10 16:05:19 -07:00