alistair23-linux/drivers/tty
Chanho Park 2a48602615 tty: do not set TTY_IO_ERROR flag if console port
Since Commit 761ed4a945 ('tty: serial_core: convert uart_close to use
tty_port_close') and Commit 4dda864d73 ('tty: serial_core: Fix serial
console crash on port shutdown), a serial port which is used as
console can be stuck when logging out if there is a remained process.
After logged out, agetty will try to grab the serial port but it will
be failed because the previous process did not release the port
correctly. To fix this, TTY_IO_ERROR bit should not be enabled of
tty_port_close if the port is console port.

Reproduce step:
- Run background processes from serial console
$ while true; do sleep 10; done &

- Log out
$ logout
-> Stuck

- Read journal log by journalctl | tail
Jan 28 16:07:01 ubuntu systemd[1]: Stopped Serial Getty on ttyAMA0.
Jan 28 16:07:01 ubuntu systemd[1]: Started Serial Getty on ttyAMA0.
Jan 28 16:07:02 ubuntu agetty[1643]: /dev/ttyAMA0: not a tty

Fixes: 761ed4a945 ("tty: serial_core: convert uart_close to use tty_port_close")
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Rob Herring <robh@kernel.org>
Cc: Jiri Slaby <jslaby@suse.com>
Signed-off-by: Chanho Park <parkch98@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-27 09:58:11 +01:00
..
hvc tty: hvc: hvc_write() fix break condition 2018-09-10 18:04:31 +02:00
ipwireless ipwireless: switch to ->[sg]et_serial() 2018-10-13 00:50:31 -04:00
serdev serdev: add dev_pm_domain_attach|detach() 2018-07-15 12:23:53 +02:00
serial TTY/Serial fixes for 4.20-rc2 2018-11-10 13:32:14 -06:00
vt TTY/Serial fixes for 4.20-rc2 2018-11-10 13:32:14 -06:00
amiserial.c kill TIOCSERGSTRUCT 2018-10-13 00:50:53 -04:00
cyclades.c cyclades: switch to ->[sg]et_serial() 2018-10-13 00:50:30 -04:00
ehv_bytechan.c tty: Convert to using %pOFn instead of device_node.name 2018-09-18 16:07:25 +02:00
goldfish.c headers: separate linux/mod_devicetable.h from linux/platform_device.h 2018-07-07 17:52:26 +02:00
isicom.c isicom: switch to ->[sg]et_serial() 2018-10-13 00:50:31 -04:00
Kconfig
Makefile
mips_ejtag_fdc.c
moxa.c moxa: switch to ->[sg]et_serial() 2018-10-13 00:50:32 -04:00
moxa.h
mxser.c mxser: switch to ->[sg]et_serial() 2018-10-13 00:50:32 -04:00
mxser.h
n_gsm.c change semantics of ldisc ->compat_ioctl() 2018-10-13 00:50:53 -04:00
n_hdlc.c
n_null.c
n_r3964.c change semantics of ldisc ->compat_ioctl() 2018-10-13 00:50:53 -04:00
n_tracerouter.c
n_tracesink.c
n_tracesink.h
n_tty.c tty: wipe buffer if not echoing data 2018-10-11 19:50:00 +02:00
nozomi.c
pty.c pty: fix compat ioctls 2018-10-13 00:50:51 -04:00
rocket.c tty: rocket: Fix possible buffer overwrite on register_PCI 2018-08-02 10:11:32 +02:00
rocket.h
rocket_int.h
synclink.c synclink: reduce pointless checks in ->ioctl() 2018-10-13 00:50:43 -04:00
synclink_gt.c synclink_gt(): fix compat_ioctl() 2018-10-13 00:50:52 -04:00
synclinkmp.c synclink: reduce pointless checks in ->ioctl() 2018-10-13 00:50:43 -04:00
sysrq.c signal: send_sig_all no longer needs SEND_SIG_FORCED 2018-09-11 21:19:07 +02:00
tty_audit.c
tty_baudrate.c termios, tty/tty_baudrate.c: fix buffer overrun 2018-11-08 03:36:45 -08:00
tty_buffer.c tty: wipe buffer. 2018-10-11 19:50:00 +02:00
tty_io.c TTY/Serial patches for 4.20-rc1 2018-10-29 10:42:20 -07:00
tty_ioctl.c move compat handling of tty ioctls to tty_compat_ioctl() 2018-09-14 11:12:17 -04:00
tty_jobctrl.c
tty_ldisc.c
tty_ldsem.c atomic/tty: Fix up atomic abuse in ldsem 2018-06-28 21:07:55 +09:00
tty_mutex.c
tty_port.c tty: do not set TTY_IO_ERROR flag if console port 2018-11-27 09:58:11 +01:00
vcc.c