linux/drivers/tty/serial
Tony Lindgren 63f4c34561 serial: core: Disable uart_start() on uart_remove_one_port()
While rebinding a uart device in a loop I noticed we may see a tx related
race on uart_remove_one_port():

uart_write from n_tty_write
n_tty_write from file_tty_write.constprop.0
file_tty_write.constprop.0 from vfs_write
vfs_write from ksys_write
ksys_write from ret_fast_syscall

Let's disallow tx on port->UPF_DEAD. This flag gets set before we start
tearing down the port in uart_remove_one_port().

Signed-off-by: Tony Lindgren <tony@atomide.com>
Link: https://lore.kernel.org/r/20230419115423.59957-1-tony@atomide.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-20 13:43:44 +02:00
..
8250 serial: 8250: Reinit port->pm on port specific driver unbind 2023-04-20 13:43:41 +02:00
cpm_uart serial: cpm_uart: Use uart_circ_empty() 2023-03-29 10:53:57 +02:00
jsm drivers: serial: jsm: fix some leaks in probe 2022-09-22 16:11:43 +02:00
21285.c tty: serial: use uart_port_tx_limited() 2022-11-03 03:32:40 +01:00
altera_jtaguart.c tty: serial: altera_jtaguart: remove struct altera_jtaguart 2022-11-22 17:51:42 +01:00
altera_uart.c serial: altera_uart: fix locking in polling mode 2022-11-23 09:38:42 +01:00
amba-pl010.c tty: serial: use uart_port_tx_limited() 2022-11-03 03:32:40 +01:00
amba-pl011.c serial: amba-pl011: fix high priority character transmission in rs486 mode 2023-01-19 14:54:58 +01:00
apbuart.c tty: serial: use uart_port_tx_limited() 2022-11-03 03:32:40 +01:00
apbuart.h
ar933x_uart.c serial: ar933x: Use uart_xmit_advance() 2022-11-03 03:35:41 +01:00
arc_uart.c serial: arc_uart: Drop empty platform remove function 2023-01-17 19:12:38 +01:00
atmel_serial.c serial: atmel: fix incorrect baudrate setup 2023-01-19 16:24:39 +01:00
atmel_serial.h tty: serial: atmel: Use FIELD_PREP/FIELD_GET 2022-09-22 16:32:25 +02:00
bcm63xx_uart.c serial: bcm63xx-uart: add polling support 2023-03-29 10:54:23 +02:00
clps711x.c serial: clps711x: Use uart_xmit_advance() 2022-11-03 03:35:41 +01:00
digicolor-usart.c serial: digicolor: Use uart_xmit_advance() 2022-11-03 03:35:41 +01:00
dz.c serial: dz: Use uart_xmit_advance() 2022-11-03 03:35:40 +01:00
dz.h
earlycon-riscv-sbi.c serial: make uart_console_write->putchar()'s character an unsigned char 2022-03-03 15:06:31 +01:00
earlycon-semihost.c serial: Rename earlycon semihost driver 2023-01-19 14:58:19 +01:00
earlycon.c earlycon: Let users set the clock frequency 2023-01-19 14:56:44 +01:00
fsl_linflexuart.c serial: linflexuart: Use uart_xmit_advance() 2022-11-03 03:35:41 +01:00
fsl_lpuart.c tty: serial: fsl_lpuart: use UARTMODIR register bits for lpuart32 platform 2023-04-20 13:42:36 +02:00
icom.c serial: Make ->set_termios() old ktermios const 2022-08-30 14:22:35 +02:00
imx_earlycon.c serial: make uart_console_write->putchar()'s character an unsigned char 2022-03-03 15:06:31 +01:00
imx.c serial: imx: remove unused imx_uart_is_imx* functions 2023-03-29 10:53:46 +02:00
ip22zilog.c serial: ip22zilog: Use uart_xmit_advance() 2022-11-03 03:35:41 +01:00
ip22zilog.h
Kconfig serial: make SiFive serial drivers depend on ARCH_ symbols 2023-04-20 13:40:38 +02:00
kgdb_nmi.c
kgdboc.c tty: serial: kgdboc: fix mutex locking order for configure_kgdboc() 2023-01-16 16:44:53 +01:00
lantiq.c tty: serial: use uart_port_tx() helper 2022-11-03 03:32:40 +01:00
liteuart.c serial: liteuart: Remove a copy of UART id in private structure 2023-01-31 10:59:48 +01:00
lpc32xx_hs.c tty: serial: use uart_port_tx() helper 2022-11-03 03:32:40 +01:00
Makefile serial: Rename earlycon semihost driver 2023-01-19 14:58:19 +01:00
max310x.c serial: Make uart_handle_cts_change() status param bool active 2023-01-19 16:04:35 +01:00
max3100.c serial: Make uart_handle_cts_change() status param bool active 2023-01-19 16:04:35 +01:00
mcf.c tty: serial: use uart_port_tx() helper 2022-11-03 03:32:40 +01:00
men_z135_uart.c serial: men_z135_uart: Use uart_xmit_advance() 2022-11-03 03:35:41 +01:00
meson_uart.c tty: serial: meson: Add a new compatible string for the G12A SoC 2023-03-09 17:21:02 +01:00
milbeaut_usio.c serial: milbeaut_usio: Use uart_xmit_advance() 2022-11-03 03:35:42 +01:00
mpc52xx_uart.c tty: serial: use uart_port_tx() helper 2022-11-03 03:32:40 +01:00
mps2-uart.c tty: serial: use uart_port_tx() helper 2022-11-03 03:32:40 +01:00
msm_serial.c serial: msm: add lock annotation to msm_set_baud_rate() 2023-01-19 15:53:09 +01:00
mux.c tty: serial: use uart_port_tx_limited() 2022-11-03 03:32:40 +01:00
mvebu-uart.c serial: mvebu-uart: Use uart_xmit_advance() 2022-11-03 03:35:42 +01:00
mxs-auart.c serial: Use of_property_read_bool() for boolean properties 2023-03-16 13:02:14 +01:00
omap-serial.c tty: serial: use uart_port_tx_limited() 2022-11-03 03:32:40 +01:00
owl-uart.c tty: serial: use uart_port_tx() helper 2022-11-03 03:32:40 +01:00
pch_uart.c tty: pcn_uart: fix memory leak with using debugfs_lookup() 2023-02-08 13:09:55 +01:00
pic32_uart.c serial: pic32: Add checks for devm_clk_get() in pic32_uart_probe() 2023-01-19 16:02:23 +01:00
pmac_zilog.c serial: pmac_zilog: Use uart_xmit_advance() 2022-11-03 03:35:42 +01:00
pmac_zilog.h serial: pmac_zilog: remove unused uart_pmac_port::termios_cache 2022-05-19 18:23:19 +02:00
pxa.c tty: serial: use uart_port_tx_limited() 2022-11-03 03:32:40 +01:00
qcom_geni_serial.c tty: serial: simplify qcom_geni_serial_send_chunk_fifo() 2023-04-20 13:32:51 +02:00
rda-uart.c serial: rda: Use uart_xmit_advance() 2022-11-03 03:35:42 +01:00
rp2.c tty: serial: use uart_port_tx_limited() 2022-11-03 03:32:40 +01:00
sa1100.c tty: serial: use uart_port_tx() helper 2022-11-03 03:32:40 +01:00
samsung_tty.c ARM: s3c: remove s3c24xx specific hacks 2023-01-16 09:26:05 +01:00
sb1250-duart.c serial: sb1250-duart: clean up after SIBYTE_BCM1x55 removal 2023-03-29 10:54:39 +02:00
sc16is7xx.c serial: sc16is7xx: Convert to i2c's .probe_new() 2023-03-09 21:58:53 +01:00
sccnxp.c serial: sccnxp: Use devm_clk_get_enabled() helper 2023-01-19 15:51:28 +01:00
serial_core.c serial: core: Disable uart_start() on uart_remove_one_port() 2023-04-20 13:43:44 +02:00
serial_mctrl_gpio.c Documentation: serial: move GPIO kernel-doc to the functions 2022-07-28 10:37:42 +02:00
serial_mctrl_gpio.h serial: mctrl_gpio: add a new API to enable / disable wake_irq 2022-02-08 11:07:16 +01:00
serial_txx9.c tty: serial: use uart_port_tx_limited() 2022-11-03 03:32:40 +01:00
serial-tegra.c serial: tegra: Add missing clk_disable_unprepare() in tegra_uart_hw_init() 2023-01-19 15:54:01 +01:00
sh-sci.c Merge 6.3-rc6 into tty-next 2023-04-10 08:51:09 +02:00
sh-sci.h
sifive.c tty: serial: use uart_port_tx_limited() 2022-11-03 03:32:40 +01:00
sprd_serial.c serial: sprd: Drop of_match_ptr for ID table 2023-03-16 13:02:17 +01:00
st-asc.c tty: serial: use uart_port_tx_limited() 2022-11-03 03:32:40 +01:00
stm32-usart.c serial: stm32: Re-assert RTS/DE GPIO in RS485 mode only if more data are transmitted 2023-03-09 17:16:11 +01:00
stm32-usart.h serial: stm32: Remove unused struct stm32_port txdone element 2023-03-09 17:16:11 +01:00
suncore.c
sunhv.c tty/serial: Make ->dcd_change()+uart_handle_dcd_change() status bool active 2023-01-19 16:04:35 +01:00
sunplus-uart.c serial: sunplus-uart: Use uart_xmit_advance() 2022-11-03 03:35:43 +01:00
sunsab.c serial: sunsab: Fix error handling in sunsab_init() 2022-11-23 09:38:50 +01:00
sunsab.h
sunsu.c serial: sunsu: Use uart_xmit_advance() 2022-11-03 03:35:43 +01:00
sunzilog.c serial: Use of_property_present() for testing DT property presence 2023-03-16 13:02:11 +01:00
sunzilog.h
tegra-tcu.c Merge 7e2cd21e02 ("Merge tag 'tty-6.0-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty") into tty-next 2022-09-25 09:22:13 +02:00
timbuart.c serial: timbuart: Use uart_xmit_advance() 2022-11-03 03:35:43 +01:00
timbuart.h
uartlite.c serial: uartlite: Use uart_xmit_advance() 2022-11-03 03:35:43 +01:00
ucc_uart.c serial: ucc_uart: Use uart_circ_empty() 2023-03-29 10:53:57 +02:00
vt8500_serial.c serial: Fix a typo ("ignorning") 2022-11-09 13:03:12 +01:00
xilinx_uartps.c TTY/Serial driver changes for 6.2-rc1 2022-12-16 03:31:56 -08:00
zs.c serial: zs: Use uart_xmit_advance() 2022-11-03 03:35:43 +01:00
zs.h