alistair23-linux/drivers/tty
Sahara b9ca5f8560 tty: pty: Fix race condition between release_one_tty and pty_write
Especially when a linked tty is used such as pty, the linked tty
port's buf works have not been cancelled while master tty port's
buf work has been cancelled. Since release_one_tty and flush_to_ldisc
run in workqueue threads separately, when pty_cleanup happens and
link tty port is freed, flush_to_ldisc tries to access freed port
and port->itty, eventually it causes a panic.
This patch utilizes the magic value with holding the tty_mutex to
check if the tty->link is valid.

Fixes: 2b022ab754 ("pty: cancel pty slave port buf's work in tty_release")
Signed-off-by: Sahara <keun-o.park@darkmatter.ae>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-28 01:28:23 +09:00
..
hvc tty: hvc_xen: Mark expected switch fall-through 2019-02-26 12:30:44 +01:00
ipwireless tty: ipwireless: fix missing checks for ioremap 2019-03-28 01:28:23 +09:00
serdev serdev: ttyport: call tiocmget and tiocmset ops directly 2019-01-30 11:48:08 +01:00
serial serial: sc16is7xx: Drop of_match_ptr() use 2019-03-28 00:30:51 +09:00
vt tty: vt.c: Fix TIOCL_BLANKSCREEN console blanking if blankinterval == 0 2019-03-28 01:28:23 +09:00
amiserial.c
cyclades.c
ehv_bytechan.c
goldfish.c
isicom.c
Kconfig tty: ldisc: add sysctl to prevent autoloading of ldiscs 2019-01-30 09:31:30 +01:00
Makefile
mips_ejtag_fdc.c
moxa.c
moxa.h
mxser.c
mxser.h
n_gsm.c tty: n_gsm: Mark expected switch fall-throughs 2019-02-26 12:30:44 +01:00
n_hdlc.c tty/n_hdlc: mark expected switch fall-through 2019-02-14 10:49:19 +01:00
n_null.c
n_r3964.c
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c n_tty: update comment for WAKEUP_CHARS define 2019-01-18 13:25:11 +01:00
nozomi.c tty/nozomi: use pci_iomap instead of ioremap_nocache 2019-02-12 10:26:45 +01:00
pty.c tty: pty: Fix race condition between release_one_tty and pty_write 2019-03-28 01:28:23 +09:00
rocket.c
rocket.h
rocket_int.h
synclink.c tty/synclink: remove ISA support 2019-02-12 08:51:33 +01:00
synclink_gt.c
synclinkmp.c
sysrq.c tty/sysrq: Convert show_lock to raw_spinlock_t 2019-03-28 01:24:55 +09:00
tty_audit.c audit: join tty records to their syscall 2019-02-07 21:33:54 -05:00
tty_baudrate.c
tty_buffer.c tty: increase the default flip buffer limit to 2*640K 2019-01-30 12:03:58 +01:00
tty_io.c tty: pty: Fix race condition between release_one_tty and pty_write 2019-03-28 01:28:23 +09:00
tty_ioctl.c
tty_jobctrl.c tty: fix read of tty->pgrp outside of ctrl_lock 2019-03-28 01:28:23 +09:00
tty_ldisc.c tty: ldisc: add sysctl to prevent autoloading of ldiscs 2019-01-30 09:31:30 +01:00
tty_ldsem.c
tty_mutex.c
tty_port.c
vcc.c