android_kernel_motorola_sm6375/drivers/tty
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Gaurav Kohli b027e2298b tty: fix data race between tty_init_dev and flush of buf
There can be a race, if receive_buf call comes before
tty initialization completes in n_tty_open and tty->disc_data
may be NULL.

CPU0					CPU1
----					----
 000|n_tty_receive_buf_common()   	n_tty_open()
-001|n_tty_receive_buf2()		tty_ldisc_open.isra.3()
-002|tty_ldisc_receive_buf(inline)	tty_ldisc_setup()

Using ldisc semaphore lock in tty_init_dev till disc_data
initializes completely.

Signed-off-by: Gaurav Kohli <gkohli@codeaurora.org>
Reviewed-by: Alan Cox <alan@linux.intel.com>
Cc: stable <stable@vger.kernel.org>

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-01-23 08:57:37 +01:00
..
hvc TTY/Serial patches for 4.15-rc1 2017-11-13 21:05:31 -08:00
ipwireless treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
serdev serdev: only match serdev devices 2018-01-22 14:19:10 +01:00
serial serial: imx: fix endless loop during suspend 2018-01-22 14:20:56 +01:00
vt tty: vt: replace _manual_ swap with swap macro in set_selection 2017-11-28 15:32:32 +01:00
amiserial.c
bfin_jtag_comm.c
cyclades.c treewide: Switch DEFINE_TIMER callbacks to struct timer_list * 2017-11-21 15:57:05 -08:00
ehv_bytechan.c
goldfish.c tty: goldfish: Enable 'earlycon' only if built-in 2017-12-15 20:27:44 +01:00
isicom.c tty/isicom: Fix a possible sleep-in-atomic bug in WaitTillCardIsFree 2017-12-15 20:24:14 +01:00
Kconfig tty: goldfish: Enable 'earlycon' only if built-in 2017-12-15 20:27:44 +01:00
Makefile
metag_da.c
mips_ejtag_fdc.c
moxa.c tty: moxa: Add support for CMSPAR 2017-11-28 15:32:33 +01:00
moxa.h tty: moxa: Add support for CMSPAR 2017-11-28 15:32:33 +01:00
mxser.c
mxser.h
n_gsm.c tty: n_gsm: Allow ADM response in addition to UA for control dlci 2018-01-09 16:45:17 +01:00
n_hdlc.c
n_null.c
n_r3964.c treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c n_tty: fix EXTPROC vs ICANON interaction with TIOCINQ (aka FIONREAD) 2017-12-21 11:19:22 +01:00
nozomi.c
pty.c
rocket.c treewide: Switch DEFINE_TIMER callbacks to struct timer_list * 2017-11-21 15:57:05 -08:00
rocket.h
rocket_int.h
synclink.c treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
synclink_gt.c treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
synclinkmp.c treewide: setup_timer() -> timer_setup() 2017-11-21 15:57:07 -08:00
sysrq.c TTY/Serial patches for 4.15-rc1 2017-11-13 21:05:31 -08:00
tty_audit.c
tty_baudrate.c
tty_buffer.c
tty_io.c tty: fix data race between tty_init_dev and flush of buf 2018-01-23 08:57:37 +01:00
tty_ioctl.c
tty_jobctrl.c
tty_ldisc.c tty: fix data race between tty_init_dev and flush of buf 2018-01-23 08:57:37 +01:00
tty_ldsem.c
tty_mutex.c
tty_port.c
vcc.c